Anatomy
Male genitals... though they risk ludicrousness by their rubbery indecisiveness, have a rational mathematical design, a syntax.
In the pen15.js library, a Penis is made of two essential sub-systems: a Spring and a CumParticleSystem. The Spring controls the display of the penis image, and the CumParticleSystem creates CumParticles.
Spring
The Spring is responsible for controlling the width and height of the penis image. It follows the physics of a spring...
F = k(x - x0)
When the cum
function is triggered, the displacement of the spring is set to 100 (this can be changed by changing the initialDisplacement
variable). The update
function then recalculates the displacement over each loop.
CumParticleSystem
A CumParticleSystem is responsible for creating new Cum Particles.
Some important variables to know:
- velocityRange - when created, each particle has a random velocity between the x values and y values specified
CumParticle
A cum particle has the following characteristics
- color - the color of the particle
- radius - the radius of the particle
- image - if this is not null, the particle will be displayed with an image