computational form (22),
everybityoumake (12),
play (12),
information (11),
atoz (10),
processingtext (10),
nime (9),
mobility (8),
thesis (8),
fabricatinginformation (7),
interactivesound (7),
mapping (6),
locative (5),
fall2007 (4),
ubicomp (4),
blah (3),
isco (3),
pcomp (3),
assistive technologies (1),
design thinking (1)
CompForm Assignment 2 - Problem 5 · posted by vaibhav bhawsar Sep 21, 05:30
Problem 5. Create a function called drawNecklace that draws a pearl necklace. Feel free to shade the pearls or make them sparkle in the light of the moving mouse.
void drawNecklace ( Vec2d c, float hr, float vr, int numberOfPoints )
{
for(int i = 0; i < numberOfPoints; i++)
{
float angle = 2*PI / numberOfPoints * i;
float x = sin(angle) * hr;
float y = cos(angle) * vr;
Vec2d p(x,y);
p = p+c;
drawCircle(p,20,20);
}
}
Comment
Commenting is closed for this article.
CompForm Assignment 2 - Problem 4 Comform Assignment 2 - Problem 6




