









 
 




 
 


Hello,
I have tow *identicals* triangles T0 and T1
T0 is "at the origin" : <0,0,0>, <a,0,0>, <b,c,0>
T1 is somewhere in space. The coordinates of the three points of the
triangle T1 are known.
How to calculate rotations/translation to "move" T0 to T1 ?
Thank you for your help...
_Merry Christmas_

Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message


 
 




 
 


hi,
kurtz le pirate <kur### [at] gmailcom> wrote:
> I have tow *identicals* triangles T0 and T1
> T0 is "at the origin" : <0,0,0>, <a,0,0>, <b,c,0>
>
> T1 is somewhere in space. The coordinates of the three points of the
> triangle T1 are known.
>
> How to calculate rotations/translation to "move" T0 to T1 ?
> Thank you for your help...
the docunentation tells me that 'transforms.inc' has two complementary macros,
'vtransform()' and 'vinv_transform()'. apparently , you can use the second to
reverse the action of the first, so given you can transform T1 to origin, maybe
that will help?
regards, jr.
Post a reply to this message


 
 




 
 


"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> kurtz le pirate <kur### [at] gmailcom> wrote:
> > I have tow *identicals* triangles T0 and T1
> > T0 is "at the origin" : <0,0,0>, <a,0,0>, <b,c,0>
> >
> > T1 is somewhere in space. The coordinates of the three points of the
> > triangle T1 are known.
> >
> > How to calculate rotations/translation to "move" T0 to T1 ?
> > Thank you for your help...
>
> the docunentation tells me that 'transforms.inc' has two complementary macros,
> 'vtransform()' and 'vinv_transform()'. apparently , you can use the second to
> reverse the action of the first, so given you can transform T1 to origin, maybe
> that will help?
>
>
> regards, jr.
do you want the triangle center? there are 5.heh. incenter() is most "central"
to translate is to move it  subvectors.
translate T0  T1
to rotate, consider your axis, long story .. heh.
gotta know your centers and sine cosine laws, there are about a dozen trig funcs
you need, or just stay home. see triangulation.inc
here a couple centers..
#macro incenter(A,B,C)
#local a = C*vlength(AB);
#local b = A*vlength(BC);
#local c = B*vlength(CA);
#local d = vlength(AB)+
vlength(BC)+
vlength(CA);
#local result = (a+b+c)/d;
result
#end
#macro centroid(A,B,C)
#local result = (A+B+C)/3;
result
#end
if you dont have this stuff, you're like crippled in 3D
Functions:
inneradius(a,b,c) 3 lens
outeradius(a,b,c)
sss_area(a,b,c)
sas_area(s,a,s2)
bh_area(b,h) Base Height
sss_height(a,b,c) height to side2
sas_cos(s,a,s2) Side Angle Side  solve length of missing side
aas_sin(a,b,s) AAS solve opposing side of angle2 (b)
asa_sin(a,s,b) ASA solve opposing side of angle2 (b)
sss_cos(a,b,c) SSS solve angle opposite side2 (b)
ssa_acute(s,s2,a) SSA solve angle opposite side2
Post a reply to this message


 
 




 
 


example rotate matrix, used on lego plane_10.
#local U = rotation(radians(flightpitch),Right,Up);
#local E = vnormalize(vcross(Right,U));
// #declare E = rotation(radians(flightpitch),Right,Eye);
// #declare r = vnormalize(vcross(y,e));
// #declare u = vnormalize(vcross(e,r));
// #declare e = vnormalize(vcross(r,y));
object { plane_10(1,0,1,0,0,0,0,frame,frame,0,60,60,90,90,0,0,0)
scale .007
rotate 90*y
pop_matrix(Right, U, E)
translate (campos  U*.64) + (U*.045) + Eye * 4
.....
WHICH DIRECTION is right up eye?
use the included crossproduct order.
could have rotated both up and eye around right, didnt have to.
vcross() : cross product is not a length of 1, normalize.
I use the rotation(r,axis,p) in triangulation.inc, refused to learn another
parameter order. and another in triangulation.inc
#macro pop_matrix(A, B, C)
transform {
matrix <A.x, A.y, A.z,
B.x, B.y, B.z,
C.x, C.y, C.z, 0, 0, 0>
}
#end
Post a reply to this message


 
 




 
 


kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
> I have tow *identicals* triangles T0 and T1
> T0 is "at the origin" : <0,0,0>, <a,0,0>, <b,c,0>
>
> T1 is somewhere in space. The coordinates of the three points of the
> triangle T1 are known.
>
> How to calculate rotations/translation to "move" T0 to T1 ?
> Thank you for your help...
Hello Kurtz
Perhaps some of what I posted in this thread may be of help to you:
Newsgroup: povray.text.tutorials
Subject: How to transform a triangle into another
Date: 20021002 23:41:55
From: Tor Olav Kristensen
http://news.povray.org/povray.text.tutorials/thread/%3C3D9B843D.E5392CD0%40hotmail.com%3E/

Tor Olav
http://subcube.com/
https://github.com/tok
Post a reply to this message


 
 




 
 


On 25/12/2019 23:53, Tor Olav Kristensen wrote:
> Perhaps some of what I posted in this thread may be of help to you:
>
> Newsgroup: povray.text.tutorials
> Subject: How to transform a triangle into another
> Date: 20021002 23:41:55
> From: Tor Olav Kristensen
>
>
http://news.povray.org/povray.text.tutorials/thread/%3C3D9B843D.E5392CD0%40hotmail.com%3E/
yes, yes... seems really very very interesting.
especially the two macros : Triangle2Triangle_Trans and
TriangleToTriangle_Trans macros.
very thanks for that.

Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message


 
 




 
 


hi,
"Melody" <nomail@nomail> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> do you want the triangle center? there are 5.heh. incenter() is most "central"
>
> to translate is to move it  subvectors.
> translate T0  T1
>
> to rotate, consider your axis, long story .. heh.
> gotta know your centers and sine cosine laws, there are about a dozen trig funcs
> you need, or just stay home. see triangulation.inc
> ...
> if you dont have this stuff, you're like crippled in 3D
> ...
uh, maths I don't know and my geometry is, um, shaky? five centres? I need to
do some reading. anyway, cannot see a 'triangulation.inc', suspect it must be
one of yours.
regards, jr.
Post a reply to this message


 
 




 
 


"jr" <cre### [at] gmailcom> wrote:
> uh, maths I don't know and my geometry is, um, shaky? five centres?
Yeah  I delved into this a while back (2014?) when doing some things with
triangles and bubbles and propellers, ....
Friedrich Lohmueller's analytical geometry tools include file has a bunch of
these.
I made a diagram in VISIO  I'll have to dig that up and post it, if I haven't
already...
> I need to
> do some reading.
Yes. :D
> anyway, cannot see a 'triangulation.inc', suspect it must be
> one of yours.
http://news.povray.org/povray.general/thread/%3C470e5314%40news.povray.org%3E/
Post a reply to this message


 
 




 
 


"Bald Eagle" <cre### [at] netscapenet> wrote:
> Yeah  I delved into this a while back (2014?) when doing some things with
> triangles and bubbles and propellers, ....
See:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.53e25769ad990c965e7df57c0%40news.povray.org%3E/?ttop=429330
&toff=800
Post a reply to this message


 
 




 

