How does Function Generator produce Sine Wave?

While there are different kind of function generators which have different modes of generating waveforms, I will tell you how a typical function generator produces sine wave. It all begins with generating a triangle waveform. Yes, all kinds of waveforms can be generated by a triangle wave. This is called as Oscillator source waveform. This is created by continuous charging and discharging of a capacitor. A comparator is used to constrain the output in specific upper and lower bounds. The circuitry (usually current and capacitor size) controls the frequency and amplitude of this source wave.This triangular ramp can now be modified into any of the waveforms by introducing logical circuits into the former. The user can control the output function through the physical interface of the device and particular part of circuit gets activated to create the desired output. The triangular signal is fed into waveform shaping circuit which includes additional diodes/transistors which chip off the peaks and add needed rounded-ness to form a sine waveform estimation.

Astronomy: Why do Mars and the other planets seem as stars in the sky, having different colors, such as red?

Even the nearest star after Sun appears as a point disc with an ordinary telescope. So, light from far stars go through thick atmosphere of the Earth (refraction!) and appears as what we call as twinkling. However, light coming from a planet does not seem to twinkle. The thumb rule is that the closer the celestial body to us, the lesser it will appear to scintillate. It happens because they appear bigger than stars and light from edges of the planet cancel this kind of random refraction through the atmosphere.

Due to increasing city lights and pollution, the planets are appearing fainter and fainter. The pollution layer is juxtaposed over the space view and reduces the actual color information. This is like putting a translucent rice paper above a red apple. You will see it lesser red. That is why it is really difficult to point out the color of the celestial body. I believe you can see Mars and other planets in near true color when seen from places away from city lights and pollution.

An interesting fact worth mentioning about Mars is that, it sometimes goes further from Sun than Earth from Sun. This causes it to appear brighter or dimmer (based on proximity to Sun). When dimmer and low in the horizon, it might also appear to scintillate.

What can I do with Processing (Programming Language)?

Processing software was originally created for the use by visual designers and creators who are not acquainted with computer programming. Processing offered them a medium to use computing power to help translate their ideas into both tangible and intangible outputs. However, Processing software still needed them to code but in a relatively straightforward manner than existing programming languages. You are also free to choose your comfortable programming language to be used within Processing software. The default language is however Java.Processing was designed for ease of use and become non-programmer’s language to both create and providing the foundation for learning computer programming. Processing was intended for ease of use and become non-programmer’s language to both create and providing the foundation for learning computer programming.

Screen Shot 2017-07-11 at 9.52.56 AM
So what can you do with Processing software?

  1. You can create generative art. Lot of examples are shared on OpenProcessing
  2. You can write computer games. There are a lot of animation and physics libraries already available. See 2D gaming using Processing.js
  3. You can interface Processing with your Arduino board (or any other development board for that matter) and communicate with it. See Arduino Playground – Processing
  4. You can create visual representations of significant data which is still a lot tedious to do in existing graphic design software.
  5. You can prototype interfaces for both software and hardware. There are handful libraries that offer access to standard UI elements or create new UI design patterns to suit your need. See controlP5
  6. You can help your robot enhance with computer vision, machine learning capabilities. There are ports available for OpenCV on Processing. See atduskgreg/opencv-processing
  7. You can add those incredible visual effects on your website which is otherwise bulky using plain JavaScript. Processing sketches can also be written in JavaScript, plus they have a dedicated JS library. See Processing.js
  8. You can create some insane looking motion graphics for your next video or art project. See Processing on Vimeo
  9. You can connect Processing to your MiDi interfaces to help you create music compositions.
  10. You can integrate Processing with your installation art/sculpture. How about projecting an image on a non-planar surface?
  11. You can create animations/visual aids to teach and discuss your ideas with your team or to show your audience.
  12. You can easily publish your processing sketches as desktop apps (Windows, Linux, Mac), embedded in web pages and even as Android apps.

Your imagination is the only limitation. You can do things way beyond the above list. Processing website, in fact, maintains a list of featured projects which they call as Exhibition Archives.

This was originally written as an answer to a question asked on Quora here.