We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › Error in example of Spotlight example in Reference
Page Index Toggle Pages: 1
Error in example of Spotlight example in Reference (Read 1201 times)
Error in example of Spotlight example in Reference
Jun 5th, 2010, 8:59am
 
The second example for spotlight has the following errors:
1. Does not include the size command with the 3d rendering engine specified, without the 3d engine specified spotlight does not work
2. The first line of the example is the number 1000, this obviously will not compile
3. Uses an undefined variable, which again causes a compilation error

Here is the cleaned up code which matches the example image:

size(100,100, P3D);
int concentration=300;
background(0);
noStroke();
spotLight(51, 102, 126, 50, 50, 400, 0, 0, -1, PI/16, concentration);
translate(80, 50, 0);
sphere(30);

Regards,

Patrick.
Page Index Toggle Pages: 1