POV-Ray : Newsgroups : povray.newusers : how can I do the opposite of clipped_by? : Re: how can I do the opposite of clipped_by? Server Time
6 Sep 2024 00:22:09 EDT (-0400)
  Re: how can I do the opposite of clipped_by?  
From: Ken
Date: 24 Apr 1999 08:52:12
Message: <3721B009.1EC1D24A@pacbell.net>
EitanTal wrote:
> 
> for example, I want to make a black rock with some text written on it, (that
> it is
> actually holes in the rock)
> 
> I mean, the text "eats" the rock by its form.
> 
> this is the opposite of clipped by.
> how do I do this?


  There are really two possible opposites to the clipped by but
I will list the most common method. What you are looking for is
probably the "difference" CSG operation. If you want to punch a
hole in something, either part of the way or all of the way, you
could use the difference to do this. I will give you a quick
example of both.

  A hole part of the way through the object example:

  difference {
    cylinder { z*-1.0, z*1.0, 1.0 }
    cylinder { z*-1.1, z*0.0, 0.5 }}


  A hole all of the way through the object example:

  difference {
    cylinder { z*-1.0, z*1.0, 1.0 }
    cylinder { z*-1.1, z*1.1, 0.5 }}


 If you wanted to subtract text from the face of a box you
could use the same method above using the Pov-Ray text
function to make your letters and then difference them from
the box. Always remember to have the object that is going
to have the hole taken from it as the first object in the
difference statement. The object that is the shape you are
removing must be the second object in the difference
statement.


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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