POV-Ray : Newsgroups : povray.newusers : CSG cutting slices : Re: CSG cutting slices Server Time
28 Jul 2024 20:30:46 EDT (-0400)
  Re: CSG cutting slices  
From: Alain
Date: 4 Oct 2007 09:59:09
Message: <4704f1ad@news.povray.org>
LikeNoOther nous apporta ses lumieres en ce 2007/10/04 05:36:
> Hi. I have previously asked for help cutting a 3D model into slices.
> The solution did unfortunately not always work. Only in simple 3D models.
> 
> Here is what I have done:
> 
> #declare MinZ = min_extent(_151stan_toon_).y;
> #declare MaxZ = max_extent(_151stan_toon_).y;
> #declare Height = MaxZ - MinZ;
> //==================================================
> 
> intersection {
>       object{
>               _151stan_toon_
>               double_illuminate
>       }
> 
>       plane{
>        y,MinZ+(frame_number/final_frame)*Height
> 
>           pigment{
>             color rgbf <1,1,1,1>
>           }
> 
>        }
>    }
> 
> The rest of the pov file was generated using poseray.
> The object name is _151stan_toon.
> I want to cut the model into slices similar to ct scans.
> (Vertical slices.)
> As far as I know all I want to do is get the intersection of the model and
> the plane. I made the plane transparent so that I can see the original
> colour of the
> model.
> 
> What happens is that it does cut it into slices but for some reason it
> keeps on creating the same slice after a while instead of going further up
> the model.
> 
> Any help will be appreciated greatly.
> 
> 
> 
I don't see anything wrong with your code, only some naming inconsistencies, 
like MinZ and MaxZ for a vertival movement where MinY and MaxY would have been 
more straightforward.

-- 
Alain
-------------------------------------------------
Stay out of my head, its a bad neighborhood.


Post a reply to this message

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