POV-Ray : Newsgroups : povray.newusers : Texture and CSG Server Time
29 Jul 2024 18:23:46 EDT (-0400)
  Texture and CSG (Message 1 to 3 of 3)  
From: telepanda
Subject: Texture and CSG
Date: 2 Mar 2005 14:20:00
Message: <web.4226114056f5c5cc3854dde20@news.povray.org>
I'm writing a 3d slicer program (a "Virtual MRI"), and am trying to make a
mock dataset to test it on.  I have a test object, a half-torus, and have
applied a radial colormap to it.  I need several different stacks of
slices, but I'll give a concrete example of where my problem lies:

My half-torus is in the XY plane.  I wish to make a large number of parallel
slices along the y-axis.  Currently, I'm doing this by intersecting it with
a very thin box, which is shifted incrementally along the y-axis by means
of the clock variable, and then photographing the result with an
orthographic camera.  Geometrically, this works fine - I get a nice stack
of slice images - but I lose the colormapping, which is crucial to my
application.

Because I'm not slicing in-plane with the radial colormap, I can't just
apply it to each individual slice.  I really need to have an appropriately
colored solid object, which I can slice from any direction, and have the
colormap be sliced too.

Can anyone help, please?


Post a reply to this message

From: Warp
Subject: Re: Texture and CSG
Date: 2 Mar 2005 14:25:04
Message: <4226130f@news.povray.org>
http://povray.org/documentation/view/3.6.1/362/

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Slime
Subject: Re: Texture and CSG
Date: 2 Mar 2005 14:28:19
Message: <422613d3$1@news.povray.org>
You can just apply the color-mapped texture to the result of the CSG, like

difference {
object{...}
object{...}
texture{...}
}

instead of

difference {
object{... texture{...}}
object{...}
}

If that's a nuisance to do (like if your object is going to be declared
ahead of time), then I think you can just add the cutaway_textures keyword
instead, and the texture of the first object will be used for the whole
difference.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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