discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

automatic rotate (and pan?)

JB
Jordan Brown
Sun, Jun 18, 2023 6:22 PM

I was thinking that I wanted to show a design to my wife, and rather
than running the rotation controls myself or telling her how to, it
seemed like it would be nice if there was an way to say "rotate
continuously", that would let give you hands-off rotation for
visualization purposes.

You can do something like this using animation, but:
(a) you'd have to write it, and
(b) animation requires re-executing the program for each animation step,
where simply rotating the view does not.

For a simple implementation, I'm not sure what the parameters would be. 
Roughly, it'd be equivalent to dragging horizontally, but I'm not sure
how it should interact with an initial rotation. One could certainly get
more extravagant, allowing rotating on an arbitrary plane or even
recording an arbitrary camera path.

Any thoughts?

I was thinking that I wanted to show a design to my wife, and rather than running the rotation controls myself or telling her how to, it seemed like it would be nice if there was an way to say "rotate continuously", that would let give you hands-off rotation for visualization purposes. You can do something like this using animation, but: (a) you'd have to write it, and (b) animation requires re-executing the program for each animation step, where simply rotating the view does not. For a simple implementation, I'm not sure what the parameters would be.  Roughly, it'd be equivalent to dragging horizontally, but I'm not sure how it should interact with an initial rotation. One could certainly get more extravagant, allowing rotating on an arbitrary plane or even recording an arbitrary camera path. Any thoughts?
TP
Torsten Paul
Sun, Jun 18, 2023 6:40 PM

Enable Joystick and trim Z-Axis rotation to a negative value :-).

I suppose this could be an additional switchable feature too.

ciao,
Torsten.

Enable Joystick and trim Z-Axis rotation to a negative value :-). I suppose this could be an additional switchable feature too. ciao, Torsten.
FH
Father Horton
Sun, Jun 18, 2023 7:00 PM

It shouldn’t be too hard to write. Just wrap the whole thing in a union and
then rotate that.

On Sun, Jun 18, 2023 at 1:40 PM Torsten Paul Torsten.Paul@gmx.de wrote:

Enable Joystick and trim Z-Axis rotation to a negative value :-).

I suppose this could be an additional switchable feature too.

ciao,
Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

It shouldn’t be too hard to write. Just wrap the whole thing in a union and then rotate that. On Sun, Jun 18, 2023 at 1:40 PM Torsten Paul <Torsten.Paul@gmx.de> wrote: > Enable Joystick and trim Z-Axis rotation to a negative value :-). > > I suppose this could be an additional switchable feature too. > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Sun, Jun 18, 2023 8:53 PM

On 6/18/2023 12:00 PM, Father Horton wrote:

It shouldn’t be too hard to write. Just wrap the whole thing in a
union and then rotate that.

Indeed it isn't hard, if you stick with the simple cases.  Note that I
say "rotate", but I don't mean with rotate(); I mean changing the view -
you want the axes to move too.  For simple cases that's not too hard to
do with $vpr and $vpt, but if you want more complicated cases (like
orbiting the camera around something other than the origin) it isn't
simple any more.

Also, animation operates by running the program once for each frame. 
Caching can help with the performance, but isn't a cure-all.

A mechanism that only drives the view would be faster and, one hopes,
easier to work with.

A general "move the camera through a path" mechanism can be written -
I've done it - but it's a pain to work with.  It would be a lot nicer to
be able to move the camera to each desired position and click to record
that position, with the program interpolating between them.

On 6/18/2023 12:00 PM, Father Horton wrote: > It shouldn’t be too hard to write. Just wrap the whole thing in a > union and then rotate that. Indeed it isn't hard, if you stick with the simple cases.  Note that I say "rotate", but I don't mean with rotate(); I mean changing the view - you want the axes to move too.  For simple cases that's not too hard to do with $vpr and $vpt, but if you want more complicated cases (like orbiting the camera around something other than the origin) it isn't simple any more. Also, animation operates by running the program once for each frame.  Caching can help with the performance, but isn't a cure-all. A mechanism that *only* drives the view would be faster and, one hopes, easier to work with. A general "move the camera through a path" mechanism can be written - I've done it - but it's a pain to work with.  It would be a lot nicer to be able to move the camera to each desired position and click to record that position, with the program interpolating between them.