Hi,
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?
Thanks in advance.
From: Warp
Subject: Re: looking for an object-type with four corners
Date: 22 Jul 2011 15:34:22
Message: <4e29d0be@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.
--
- Warp
> > 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?
"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
From: Christian Froeschlin
Subject: Re: looking for an object-type with four corners
Date: 22 Jul 2011 20:01:58
Message: <4e2a0f76$1@news.povray.org>
folkert wrote:
> Any hints how I convert a 4-point square into the 16 points of a bicubic_patch?
4 points do not uniquely define a "quadrangle" in 3d space,
so you need to be a bit clearer on the shape of the object
you wish to produce. The simplest way is two triangles with
a sharp edge but even then there are two ways of splitting
that yield a different shape.