POV-Ray : Newsgroups : povray.newusers : Animating with CSG : Re: Animating with CSG Server Time
28 Jul 2024 22:24:01 EDT (-0400)
  Re: Animating with CSG  
From: Alain
Date: 28 Jun 2007 17:47:42
Message: <46842c7e$1@news.povray.org>
LikeNoOther nous apporta ses lumieres en ce 2007/06/28 05:34:
> Hi.
> 
> I have to create a program or script to cut a 3D model into layers(slices).
> The layers will look similar to CT scans (X-rays).
> To do this I can use two planes to cut 3D model.
> 
> I just have to do an animation and move the places upward through the model.
> I understand what to do, unfortunately I don't know exactly how to do this.
> 
> There is another problem with this. I have to be able to use a 3D mesh from
> either 3DS or Lightwave format. When I convert it to POV-Ray, the model is
> not centered at the origin.
> 
> Can a script center the object?
> 
> The layers must start from the bottom and run to the top of the model making
> vertical layers(slices).
> 
> Is there a way to determine where the lowest y value is in the mesh?
> (I don't think so..)
> 
> 
> Any help will be appreciated.
> 
> 
As Simon told, using min_extent/max_extent will give you where the object is 
locates and it's bounding box dimentions. The actual placement is not realy 
importent, as long as the camera is correctly placed.
Now, using that information and the built-in variable "clock" you can intersect 
a box from your mesh and move that box up according to the value of clock.
clock returns a value that range from 0 (start of the animation) to 1 (at the 
end). Divide the height of your object by that value, translate the box to the 
bottom of the mesh and add (height/clock). It will automaticaly move from the 
bottom to the top independently of how many frame you use.

You can intersect FROM a mesh, but you normaly can't intersect a mesh from 
another object. Also, note that this intersection will only show the surfaces of 
the mesh as a thin shell. This may make the object almost disapear if viewed 
from the top.

-- 
Alain
-------------------------------------------------
Gone crazy, be back later, leave message.


Post a reply to this message

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