"folkert" <fol### [at] vanheusden com> 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
|