POV-Ray : Newsgroups : povray.newusers : Rotating : Re: Rotating Server Time
30 Jul 2024 00:25:52 EDT (-0400)
  Re: Rotating  
From: Mike Raiford
Date: 10 Dec 2004 08:07:28
Message: <41b99f90$1@news.povray.org>
Bryan Heit wrote:
> I have an unusual and long question about rotating.  I'm working on 
> making some 3D models of some proteins for work.  Some of these proteins 
> have portions which move relative to other parts of the protein.  I want 
> to be able to move these parts relative to each other.  At this point I 
> am achieving this by drawing each "half" of the protein as a separate 
> object, rotating/translating the moving part, and then "unioning" them 
> together.
> 
> 
> The problem with this process is that when I rotate the objects rotate 
> around their centres, rather then around the point where they join.  At 
> this point this isn't a huge problem, but in the future I am planning on 
> animating these things, and it would be quite difficult to do so using 
> the current model.  What I was wondering is if there was a way to set-up 
> an object such that the "centre of rotation" was at a specified place, 
> rather then where the computer assigns it.
> 
> Thanx
> 
> Bryan
> 
There are macros in the transforms.inc file that allow this kind of stuff

Rotate_Around_Trans(Rotation, Point) seems like it would do what you want.

-------------------------------------------------------------------
The following may help, but I make no guarantees. From here on out 
consider what I'm saying as simply rambling.
-------------------------------------------------------------------

Generally if I want to "articulate" something, I build the end that will 
be doing the rotation at the origin, pass its rotations into a macro 
that creates the object with an articulation point, then translate it to 
where it is. When modelling in POVRay, I tend to use very localised 
coordinate systems.

An example of what I mean by localised coordinate systems.

Suppose I wanted a table that sat on a floor with a glass on the table:

1) Define the glass so its bottom is at the origin.
2) Define the table so its top is at origin.

3) Define a union of the table and the glass. Translate so the feet are 
at origin

4) Define the floor so it is at origin.

There are a few caveats:

1)  I assume its easy to see how far you need to translate the 
table-glass union. The legs of the table end at a specifc -Y value (RHCS)

2) I did not mention that the translation of the glass should be down by 
a very very tiny amount (or up, depending on how many surfaces you want 
to be considered by IOR at the bottom of the glass)

3) It may be too difficult to know where to start/end on a protien 
structure, which I'm making a wild guess that it is not entirely 
hand-modelled, but coming from a molecular-level modelling program?

-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.