|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I was going to put some text on a triangle, and was wondering how to do
it.
given a triangle with three points (p1, p2, p3) I can get a normal by
using a cross product of (p2-p1) and (p3-p1).
Now that I have that, I can't figure out how to use it to rotate my text
so it is on the plane defined by the three points.
(I can position the text once I have the rotation - I was going to
translate it to (p1+p2+p3)/3 which puts it in the middle of the
triangle.)
Any help?
--
Tom A.
"No doubt many that post deserve to be flamed. And many that are flamed
didn't deserve it. Can you give them the latter? Then don't be so
quick to deal out the former!" - not Gandalf.
Deja mail is gone. Look for me at raugost at yahoo . com
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: Normal question (writing on a triangle)
Date: 25 Jan 2002 12:59:51
Message: <3C519D13.F39E344E@gmx.de>
|
|
|
| |
| |
|
|
"Tom A." wrote:
>
> I was going to put some text on a triangle, and was wondering how to do
> it.
>
> given a triangle with three points (p1, p2, p3) I can get a normal by
> using a cross product of (p2-p1) and (p3-p1).
> Now that I have that, I can't figure out how to use it to rotate my text
> so it is on the plane defined by the three points.
>
> (I can position the text once I have the rotation - I was going to
> translate it to (p1+p2+p3)/3 which puts it in the middle of the
> triangle.)
>
> Any help?
You can for example try uv-mapping or use the 'Reorient_Trans()' macro.
Christoph
--
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Assuming you are using the 3.5 beta:
There is a macro in the standard includes (transforms.inc) that will
reorient an object or texture to a certain vector, this will probably do
what you want. And if you don't need 3D text, you could use the object
pattern to put the lettering in the actual texture of the triangle.
For 3.1/MegaPOV: there are various reorient macros floating around. With
3.1 you are stuck with objects, but MegaPOV also has the object pattern.
--
--
Christopher James Huff <chr### [at] maccom>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann <chr### [at] gmxde> wrote:
: You can for example try uv-mapping or use the 'Reorient_Trans()' macro.
Making the text an image map or alternatively an object pattern (if you
are using the text primitive) and then using uv-mapping is certainly the
nicest solution because it gives you the most accurate control about mapping
the text on the triangle.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |