Results 1 to 3 of 3

Thread: Enjoy! II

  1. #1
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    10,119

    Default Enjoy! II

    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...

  2. #2
    Join Date
    Oct 2006
    Location
    Central Florida
    Posts
    7,067

    Thumbs up

    Quote Originally Posted by mixedgas View Post
    The second in our Enjoy! Series

    http://spot.colorado.edu/~lessley/index.html

    Laser Light Math.

    Quiz on monday!

    Steve
    Thanks Steve but I, um, might be busy on Monday...
    Love, peace, and grease,

    allthat... aka: aaron@pangolin

  3. #3
    Join Date
    Sep 2007
    Location
    Omaha, NE
    Posts
    769

    Default

    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
    Attached Images Attached Images
    Last edited by mikkojay; 11-18-2009 at 22:41.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •