POV-Ray : Newsgroups : povray.general : Q: object gone.... : Re: Q: object gone.... Server Time
15 Nov 2024 01:15:42 EST (-0500)
  Re: Q: object gone....  
From: Anthony Bennett
Date: 11 Apr 1999 11:37:41
Message: <37105ECB.FF63D7B6@panama.phoenix.net>
I didn't know this, but apparently, when you clip an object, it becomes
hollow. Don't know why. Here's a new version of the macro that should work
perfectly. I tested it on you objects. What are you making?

//by Anthony Bennett     <-- notice 2 Ts in Bennett :)
#macro ascale(obj,XYZ,s1,s2)
union
{
 intersection {object {obj scale s1} plane{XYZ,0}}
 intersection {object {obj scale s2} plane{-XYZ,0}}
}
#end

ingo wrote:

> I was playing with Anthony's ascale macro. When to shapes made with the
> macro are differenced, the complet object is gone. What is the reason for
> this?
>
> #macro ascale(obj,XYZ,s1,s2)//by Anthony Bennet
> union{
> object{obj scale s1 clipped_by{plane{ XYZ,0}}}
> object{obj scale s2 clipped_by{plane{-XYZ,0}}}
> }
> #end
>
> #declare Ball=sphere{0,1 pigment{Red}}
> #declare Ball=object{ascale(Ball,y,<1,1,1>,<1,2,1>)}
>
> #declare Cyl=cylinder{-2*z,2*z,0.25}
> #declare Cyl=object{ascale(Cyl,y,<1,1,1>,<1,2,1>)}
>
> difference{
> object{Ball}
> object{Cyl}
> pigment{Red}
> }
>
> ingo
> --
> Met dank aan de muze met het glazen oog.


Post a reply to this message

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