[Edu-sig] More re Saturday Academy course

kirby urner kirby.urner at gmail.com
Sun May 21 16:30:48 CEST 2006


> Important in ray tracing:  to locate the point the camera.
>

...to locate and point the camera (I meant to type), com sa:

camera {
    location <3, 5, -30>
    look_at  <-2, 1,  2>
 }

And here's typical output from the aforementioned somesphere() function:

sphere {
    <0, -1, 2>, 1.0
    texture {
      pigment { color Orange }
    }
}

My more typical approach in CP4E is to develop a Gibbsian vector
class, complete with operator overloading, then feed vectors to a
POV-writer with a focus on three main features corresponding to
Euler's V + F = E + 2:  vertices, faces and edges.  In POV-Ray, these
would be spheres, polygons and cylinders.

However, there's no requirement that vector arithmetic be an early
focus.  String substition, perhaps coming from Madlibs, and now used
to develop scene description language, would prepare students for the
later vector-based POV-writer code.

Still later:  Quaternions (how vector algebra got started actually, by
Hamilton, until they were later subclassed and adapted by Gibbs and
Heaviside later on).  Herman Grassmann helped universalize the
concepts and now we have the Clifford Algebra branch in addition to
the more traditional Gibbsian and Hamiltonian.

All of these different math objects may be explored pythonically,
using the "maths as extensible type system" approach.

http://en.wikipedia.org/wiki/Exterior_algebra

Kirby


More information about the Edu-sig mailing list