|
|
well, I thought it worked but it didn't.
I think there's something wrong with the vtransform part (I'm working with
megapov 0.4). what does it actually do?
here is my code:
// p2-p1-p3 (p1 is the central point)
// p1 = < 5.076621, 5.713426, -1.745696>
// p2 = < 4.703301, 6.268358, -2.430469>
// p3 = < 5.634149, 6.302207, -1.237040>
#declare v1 = <0.9572,0,0>;
#declare v2 = <-0.239987, 0.926627, 0>; // x=(0.9572 *
cos104.52), y=(0.9572 * sin104.52)
#declare new1 = <-0.37332, 0.55493, -0.68477>; // newpoint2 - newpoint1
#declare new2 = < 0.55753, 0.58878, 0.50866>; // newpoint3 - newpoint1
object { myobject
Reorient(v1, new1)
//AxisRotate(new1,71) this one works but i don't know how to get the 71.
Reorient(vtransform(v2, Reorient(v1, new1)), new2)
translate < 5.076621, 5.713426, -1.745696>
}
thanks,
sa
Mark Wagner wrote:
> If you are using the MegaPatch, the following will work:
> #declare V1 = point2-point1; /* These are the points of the object */
> #declare V2 = point3-point1;
>
> #declare New1 = NewPoint2 - NewPoint1; /* NewPoint1, NewPoint2, NewPoint3
> are the positions you want to move the object to */
> #declare New2 = NewPoint3 - NewPoint2;
>
> object{MyObject
> REORIENT(V1, New1) /* This is VanSickle's Reorient macro, or anyone else's
> reorient macro */
> REORIENT(vtransform(V2,_REORIENT(V1, New1)), New2)
> }
>
> This will also work without the MegaPatch, but you will need to figure out
> the math for the vtransform function yourself.
>
> Mark
Post a reply to this message
|
|