POV-Ray : Newsgroups : povray.newusers : looking for an object-type with four corners : Re: looking for an object-type with four corners Server Time
30 Jun 2024 14:43:16 EDT (-0400)
  Re: looking for an object-type with four corners  
From: folkert
Date: 22 Jul 2011 16:00:01
Message: <web.4e29d638534cf3cde70ca0910@news.povray.org>
"folkert" <fol### [at] vanheusdencom> wrote:
> > > I'm looking for an object-type with four corners. One could think of a square
> > > but not with all corners in the same plane.
> > > Any suggestions?
> >
> >   bicubic_patch.
>
> That looks indeed usable.
> Any hints how I convert a 4-point square into the 16 points of a bicubic_patch?

I was thinking of:


// square:
// x1y1   x2y2
// x4y4   x3y3

xm1 = ((x2 - x1) / 4) * xstep + x1
ym1 = ((y2 - y1) / 4) * ystep + y1
xm2 = ((x3 - x4) / 4) * xstep + x4
ym2 = ((y3 - y4) / 4) * ystep + y4
x = (xm1 * (3 - xstep) + xm2 * xstep) / 4
y = (ym1 * (3 - ystep) + ym2 * ystep) / 4

and then run xstep from 0 to 3 and same for ystep but i'm not entirely sure


Post a reply to this message

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