POV-Ray : Newsgroups : povray.newusers : difference and bicubic_patch Server Time
12 Nov 2024 19:17:43 EST (-0500)
  difference and bicubic_patch (Message 1 to 7 of 7)  
From: marabou
Subject: difference and bicubic_patch
Date: 21 Nov 2001 13:56:45
Message: <3bfbf8ed@news.povray.org>
hello,
i made a shape with bicubic_patch and failed as i tried to difference it 
from a box:

difference{
box{<0,0,0>,<1,1,1> pigment{color Green}}
object{
        a_bicubic_object
}
}//difference

the result was an empty scene.
is there any way to come by this problem?


Post a reply to this message

From: MR
Subject: Re: difference and bicubic_patch
Date: 21 Nov 2001 14:18:16
Message: <3bfbfdf8$1@news.povray.org>
hi marabou,

hey!  thats one i can answer!  difference is a constructive
solid geometry option, and that only works with "primitive"
shapes, such as cylinders, boxes, spheres, etc.  all of those
shapes except the donut (toroid) are listed in the scene
language help document in section 2.2.

good luck, miker


"marabou" <not### [at] availableyet> wrote in message
news:3bfbf8ed@news.povray.org...
>
> hello,
> i made a shape with bicubic_patch and failed as i tried to difference it
> from a box:
>
> difference{
> box{<0,0,0>,<1,1,1> pigment{color Green}}
> object{
>         a_bicubic_object
> }
> }//difference
>
> the result was an empty scene.
> is there any way to come by this problem?
>
>


Post a reply to this message

From: marabou
Subject: Re: difference and bicubic_patch
Date: 21 Nov 2001 14:41:54
Message: <3bfc0381@news.povray.org>
MR wrote:

> hi marabou,
> 
> hey!  thats one i can answer!  difference is a constructive
> solid geometry option, and that only works with "primitive"
> shapes, such as cylinders, boxes, spheres, etc.  all of those
> shapes except the donut (toroid) are listed in the scene
> language help document in section 2.2.
> 
> good luck, miker

miker, i fear you are right. and this confirms my results. yes. hm. smack. 
but how to come by this problem? is there another possibility?
thanks for the hint!

> 
> 
> "marabou" <not### [at] availableyet> wrote in message
> news:3bfbf8ed@news.povray.org...
>>
>> hello,
>> i made a shape with bicubic_patch and failed as i tried to difference it
>> from a box:
>>
>> difference{
>> box{<0,0,0>,<1,1,1> pigment{color Green}}
>> object{
>>         a_bicubic_object
>> }
>> }//difference
>>
>> the result was an empty scene.
>> is there any way to come by this problem?
>>
>>


Post a reply to this message

From: MR
Subject: Re: difference and bicubic_patch
Date: 21 Nov 2001 16:31:05
Message: <3bfc1d19$1@news.povray.org>
hi marabou,

i would say that the easiest option is to tug on some of the
control points of your patch to difference the box.  does
that make sense?

good luck, miker


"marabou" <not### [at] availableyet> wrote in message
news:3bfc0381@news.povray.org...
> MR wrote:
>
> > hi marabou,
> >
> > hey!  thats one i can answer!  difference is a constructive
> > solid geometry option, and that only works with "primitive"
> > shapes, such as cylinders, boxes, spheres, etc.  all of those
> > shapes except the donut (toroid) are listed in the scene
> > language help document in section 2.2.
> >
> > good luck, miker
>
> miker, i fear you are right. and this confirms my results. yes. hm. smack.
> but how to come by this problem? is there another possibility?
> thanks for the hint!
>
> >
> >
> > "marabou" <not### [at] availableyet> wrote in message
> > news:3bfbf8ed@news.povray.org...
> >>
> >> hello,
> >> i made a shape with bicubic_patch and failed as i tried to difference
it
> >> from a box:
> >>
> >> difference{
> >> box{<0,0,0>,<1,1,1> pigment{color Green}}
> >> object{
> >>         a_bicubic_object
> >> }
> >> }//difference
> >>
> >> the result was an empty scene.
> >> is there any way to come by this problem?
> >>
> >>
>


Post a reply to this message

From: JRG
Subject: Re: difference and bicubic_patch
Date: 21 Nov 2001 16:46:03
Message: <3bfc209b@news.povray.org>
MR
> hi marabou,
>
> hey!  thats one i can answer!  difference is a constructive
> solid geometry option, and that only works with "primitive"
> shapes, such as cylinders, boxes, spheres, etc.  all of those
> shapes except the donut (toroid) are listed in the scene
> language help document in section 2.2.

What do you mean with "primitive"? Difference truly works with every object
which has got a well defined "inside" and "outside". So it works fine with
planes, isosurfaces, heightfields and (with MegaPov) meshes too.

--
Jonathan.


Post a reply to this message

From: Warp
Subject: Re: difference and bicubic_patch
Date: 21 Nov 2001 17:08:40
Message: <3bfc25e7@news.povray.org>
AFAIK, CSG calculations need to know whether a certain point is inside
a given object or not. This means that the objects participating in the CSG
construct must have well-defined inside (ie. povray can calculate if the
point is or isn't inside the object).
  The insideness test is defined for most primitives (because it's so easy).
However, meshes and bicubic patches make an exception because they don't have
a well-defined inside. It's not clear how to calculate whether a point is
inside them or not in a general case.
  For closed meshes a test can be done, tough, and this has been implemented
in MegaPov.

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


Post a reply to this message

From: Batronyx
Subject: Re: difference and bicubic_patch
Date: 24 Nov 2001 13:51:10
Message: <3bffec1e@news.povray.org>
"marabou" <not### [at] availableyet> wrote in message news:3bfbf8ed@news.povray.org...
>
> hello,
> i made a shape with bicubic_patch and failed as i tried to difference it
> from a box:
>
> difference{
> box{<0,0,0>,<1,1,1> pigment{color Green}}
> object{
>         a_bicubic_object
> }
> }//difference
>
> the result was an empty scene.
> is there any way to come by this problem?

As warp explained, this won't work directly. However, heightfields _do_
difference correctly. Depending on what you want to do, this will work: render
an orthographic view of your patch object, with the cutting side pointing
towards the camera, and a black to white gradient assigned to the patch -- back
to front with respect to the camera view -- and use ambient one and no lights.
Use the resulting image as a heigtfield and difference it from the cube. In 3.5
or MegaPOV, using max_extents on your patch object can help you get the proper
scaling values for the heightfield.

Hope that helps :)

Batronyx ^"^


Post a reply to this message

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