This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Esfera. David Pena. Distribucion aleatoria uniforme sobre la superficie de una esfera. Modifications by subpixel: removal of unused global arrays; calculate end point of a hair as the hairLength distance from the hair base, not as a point at a fixed distance from the centre of the sphere (which causes hairs to stretch); reverse Ymouse reactivity so ball spins in the direction of mouse movement instead of against it; added start/pause functionality on mouse click event v2: 2008-11-09 renamed/repurposed some identifiers Globals: cuantos -> NUM_HAIRS, lista[] -> HAIRS[], radio -> BASE_RADIUS, hairmin/max -> MIN/MAX_HAIR_LENGTH, rx/ry -> RX/RY class pelo -> class Hair dibujar() -> draw() new class Oscillator Oscillator introduced for the radius of the inner sphere, the base of the "outer sphere" (the hairs), and also the number of hairs displayed. The inner sphere is now red so you can see it Moving the mouse increases the "heart rate" of the inner sphere (which gradually slows down) Moving the mouse also increases the base radius of the outer sphere based on the speed

Source code: Esfera_mod_by_spxl_2

Built with Processing