Subject:
|
Re: Mirror matrix question
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Mon, 15 Jun 2009 16:03:44 GMT
|
Viewed:
|
9128 times
|
| |
| |
In lugnet.cad, Timothy Gould wrote:
> In lugnet.cad, Kevin L. Clague wrote:
> > Hi gang,
> >
> > If I have an LDraw Type 1 line that adds a submodel, and the rotation matrix
> > of the line is a mirrored matrix about one and only one axis, can one calculate
> > which axis the model is mirrored about? Can one do so if the user mirrored
> > *and* rotated the submodel when adding it to the model?
> >
> > What I want to do is to be able to render the mirror image version of the
> > model as the mirror image (so the user builds the submodel correctly), but with
> > the same overall orientation as the non-mirrored version.
> >
> > Any help would be great.
> >
> > Thanks,
> > Kevin
>
> Not sure if this helps but...
>
> If you solve
>
> (M11+1) x + M12 y = - M13
> M21 x + (M22+1) y = - M23
>
> and then normalise the vector (x,y,1) the result will be a vector normal to the
> mirroring plane. To test that you indeed have a rotation/mirror you can check
> that
> M31 x + M32 y = -(M33+1)
> to required precision.
>
> Tim
Hi Tim,
Thanks. Math is not my specialty, so all help is appreciated.
If the user has rotated the mirrored submodel, doesn't the vector normal then
also get rotated? The hope was there was a way to separate the mirrored aspect
of the rotation matrix from the rotation aspect of the rotation matrix.
Then with just the mirrored aspect of the rotation matrix, I would have the
renderer create mirrored images of unmirrored submodel steps, instead of
mirrored and rotated images of the unmirrored submodel steps.
In the case where mirrored but unrotated submodels are used, LPub creates
mirrored image steps for the mirrored submodel. In Jaco's case, where he used a
mirrored matrix, and then rotated it, the images created for his model had one
wing's step images rotated at a funny angle.
Thanks,
Kevin
|
|
Message has 1 Reply: | | Re: Mirror matrix question
|
| Hi Kevin, Here's the problem. A mirror plus a rotation can look just like a mirror across another axis. Ugly 2D ASCII art example: .|b --- .|. Mirror the b to the left. d|. --- .|. Rotate 180 degrees. .|. --- .|p That looks just like you mirrored (...) (15 years ago, 15-Jun-09, to lugnet.cad)
|
Message is in Reply To:
| | Re: Mirror matrix question
|
| (...) Not sure if this helps but... If you solve (M11+1) x + M12 y = - M13 M21 x + (M22+1) y = - M23 and then normalise the vector (x,y,1) the result will be a vector normal to the mirroring plane. To test that you indeed have a rotation/mirror you (...) (15 years ago, 15-Jun-09, to lugnet.cad)
|
9 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|