[OpenSCAD] That did it...
whosawhatsis at gmail.com
Mon Mar 28 18:55:04 CEST 2011
On Mon, Mar 28, 2011 at 9:30 AM, Dan Zuras 3D <threedee at nonabelian.com> wrote:
> I suspect Whosawhatsis is going to want to make
> everything a function of time.
> Is that correct, Whosawhatsis?
> If the elements of each position are made user
> defined functions of time would that be a big deal?
> I haven't used the animation stuff so I'm talking
> out of my depth here.
Actually, I had no intention of using this feature, just playing out
the possibilities in my mind in order to figure out what should be
implemented and how.
The way the animation function works is to repeatedly render the file
with the $t variable changing each time, IIRC in the range 0-1, then
repeating. So to animate the rotation of something, you would use
something like rotate([0, 0, 360 * $t]).
It seems to me the the most logical way to make viewport control
available within the script, while maintaining compatibility with the
way it is controlled manually, is to set a location (x, y, z
coordinates) for the center of the frame, which is also the center of
camera rotation. You then need two angles (pitch and yaw only, roll is
not currently available, and adding it might unnecessarily complicate
the interface) and a zoom or view distance variable (this is what is
controlled with the scroll wheel).
More information about the OpenSCAD