POV-Ray : Newsgroups : povray.advanced-users : Clipping a bicubic patch Server Time
29 Apr 2024 14:26:01 EDT (-0400)
  Clipping a bicubic patch (Message 1 to 5 of 5)  
From: MidiPlay
Subject: Clipping a bicubic patch
Date: 12 Feb 2015 22:20:01
Message: <web.54dd6cbace7470f4797245b80@news.povray.org>
I've got a surface made up of bicubic patches, and I want to clip it to a box
region so that I can see the cross-section of the surface.  I've tried using
"clipped_by{ box { <0, 0, 0>, <100, 100, 100> } }" and "bounded_by{ box { <0, 0,
0>, <100, 100, 100> } }", but they have no effect, the entire surface is still
visible.  For example, the following should not be visible at all, but it is:

bicubic_patch
{
    type 1
    flatness 0
    < -450, 0, -347>, < -449, 0, -115>, < -450, 0, 115>, < -450, 0, 347>,
    < -453, 0, -347>, < -453, 0, -115>, < -453, 0, 115>, < -453, 0, 347>,
    < -456, 0, -347>, < -456, 0, -115>, < -456, 0, 115>, < -456, 0, 347>,
    < -460, 0, -347>, < -460, 0, -115>, < -460, 0, 115>, < -460, 0, 347>
    texture
    {
        pigment
        {
            rgbf <0.278,0.5,0.25,     1>
        }
    }
    interior_texture
    {
        pigment
        {
            rgbf <0.5,0.235,0.157,    1>
        }
    }
    clipped_by{ box { <0, 0, 0>, <100, 100, 100> } }
}

Any suggestions?


Post a reply to this message

From: Thomas de Groot
Subject: Re: Clipping a bicubic patch
Date: 13 Feb 2015 03:12:18
Message: <54ddb1e2@news.povray.org>
On 13-2-2015 4:17, MidiPlay wrote:

> Any suggestions?
>

Yes, make an intersection:

intersection {
   Your_bicubic_patch{}
   box {<0,0,0>, <100,100,100>}
}


-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: Clipping a bicubic patch
Date: 13 Feb 2015 06:41:43
Message: <54dde2f7$1@news.povray.org>
Am 13.02.2015 um 09:12 schrieb Thomas de Groot:
> On 13-2-2015 4:17, MidiPlay wrote:
>
>> Any suggestions?
>>
>
> Yes, make an intersection:
>
> intersection {
>    Your_bicubic_patch{}
>    box {<0,0,0>, <100,100,100>}
> }

well, it /should/ work with clipped_by though.


Post a reply to this message

From: clipka
Subject: Re: Clipping a bicubic patch
Date: 13 Feb 2015 07:35:18
Message: <54ddef86$1@news.povray.org>
Am 13.02.2015 um 12:41 schrieb clipka:
> Am 13.02.2015 um 09:12 schrieb Thomas de Groot:
>> On 13-2-2015 4:17, MidiPlay wrote:
>>
>>> Any suggestions?
>>>
>>
>> Yes, make an intersection:
>>
>> intersection {
>>    Your_bicubic_patch{}
>>    box {<0,0,0>, <100,100,100>}
>> }
>
> well, it /should/ work with clipped_by though.

Turns out someone must have forgotten to implement handling of 
clipped_by for the bezier patch. Don't know if it ever worked.

A bug, obviously.

I just submitted a fix to our GitHub repository.


Post a reply to this message

From: MidiPlay
Subject: Re: Clipping a bicubic patch
Date: 16 Feb 2015 20:50:01
Message: <web.54e29d5d5cc3efea9c51a3a70@news.povray.org>
intersection worked - thanks very much.

clipka <ano### [at] anonymousorg> wrote:
> Am 13.02.2015 um 12:41 schrieb clipka:
> > Am 13.02.2015 um 09:12 schrieb Thomas de Groot:
> >> On 13-2-2015 4:17, MidiPlay wrote:
> >>
> >>> Any suggestions?
> >>>
> >>
> >> Yes, make an intersection:
> >>
> >> intersection {
> >>    Your_bicubic_patch{}
> >>    box {<0,0,0>, <100,100,100>}
> >> }
> >
> > well, it /should/ work with clipped_by though.
>
> Turns out someone must have forgotten to implement handling of
> clipped_by for the bezier patch. Don't know if it ever worked.
>
> A bug, obviously.
>
> I just submitted a fix to our GitHub repository.


Post a reply to this message

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