The second in our Enjoy! Series
http://spot.colorado.edu/~lessley/index.html
Laser Light Math.
Quiz on monday!
Steve
The second in our Enjoy! Series
http://spot.colorado.edu/~lessley/index.html
Laser Light Math.
Quiz on monday!
Steve
Qui habet Christos, habet Vitam!
I should have rented the space under my name for advertising.
When I still could have...
That's the coolest thing- thanks for the link!
edit...
Yeah, sin and cos is at the core of all this stuff.
It's too bad that guy didn't post any code, but it is still very informational.
Here is the bit of code the "engine" behind the attached pic:
if (mShapeType == EShapeType.Polygon)
{
Matrix mat = new Matrix(2);
for (int i = 0; i < mSides; i++)
{
double x = mRadius * Math.Cos((2 * Math.PI / mSides) * i);
double y = mRadius * Math.Sin((2 * Math.PI / mSides) * i);
mat.AddRow(new Double[] { x, y });
}
Don't forget your PI!
If anyone wants to see some code for a similar project that I'd recommend, there is one on codeproject here.
So many of the visuals and screensavers are based off this, just with twists and tweaks.
Thanks, Mike
Last edited by mikkojay; 11-18-2009 at 22:41.