|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ok, here's my problem right now:
My tree and branches are made by following along a spline, placing vertices at a
specified radius in a circle around the spline. In order for the branches to
have a consistent radius, I need the plane on which each circle of vertices
rests to be perpendicular to the the direction of the spline.
I thought that would be simple enough, but I'm having trouble. I've been trying
to use vcross() to get an perpendicular axis to rotate a vector around, but
every time the spline changes direction, the axis will flip and therefore so
does the order of my vertices. The result is an effect similar to twisting a
tube balloon.
Am I making any sense? Any help? Any simple solution that I'm just not seeing?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kirk Andrews" <kir### [at] tektonartcom> wrote in message
news:web.48489920de6841fda5d4a01d0@news.povray.org...
> Ok, here's my problem right now:
>
> My tree and branches are made by following along a spline, placing
> vertices at a
> specified radius in a circle around the spline. In order for the branches
> to
> have a consistent radius, I need the plane on which each circle of
> vertices
> rests to be perpendicular to the the direction of the spline.
>
> I thought that would be simple enough, but I'm having trouble. I've been
> trying
> to use vcross() to get an perpendicular axis to rotate a vector around,
> but
> every time the spline changes direction, the axis will flip and therefore
> so
> does the order of my vertices. The result is an effect similar to
> twisting a
> tube balloon.
>
> Am I making any sense? Any help? Any simple solution that I'm just not
> seeing?
Yes. Keep a running note of the vector that you used to start the previous
circular sweep. Then use the VPerp_Adjust function in math.inc to adjust it
so that it is perpendicular to the direction of the spline for the next
step. This avoids suddenly getting a vector that points in completely the
opposite direction and should therefore avoid the irritating twisting
effect.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Yes. Keep a running note of the vector that you used to start the previous
> circular sweep. Then use the VPerp_Adjust function in math.inc to adjust it
> so that it is perpendicular to the direction of the spline for the next
> step. This avoids suddenly getting a vector that points in completely the
> opposite direction and should therefore avoid the irritating twisting
> effect.
>
> Regards,
> Chris B.
Ah! Thank you. Works great. I didn't think to look in math.inc for more
vector functions.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kirk Andrews" <kir### [at] tektonartcom> wrote in message
news:web.484985d0de6841fdb555cae70@news.povray.org...
>> Yes. Keep a running note of the vector that you used to start the
>> previous
>> circular sweep. Then use the VPerp_Adjust function in math.inc to adjust
>> it
>> so that it is perpendicular to the direction of the spline for the next
>> step. This avoids suddenly getting a vector that points in completely the
>> opposite direction and should therefore avoid the irritating twisting
>> effect.
>>
>> Regards,
>> Chris B.
>
> Ah! Thank you. Works great. I didn't think to look in math.inc for more
> vector functions.
My pleasure. I remember it took me quite some time a few years ago to
discover it when I wanted to add some clothing around a limb and I don't
think I've ever used it for anything else since :o)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |