To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 11646
11645  |  11647
Subject: 
Re: Quick way to mirror-image a model?
Newsgroups: 
lugnet.cad
Date: 
Wed, 23 Jun 2004 16:08:24 GMT
Viewed: 
3887 times
  
In lugnet.cad, Carl Nelson wrote:
In lugnet.cad, Steve Bliss wrote:
Actually, I think they're not - "Steve's algorithm" (ha!) requires that both the
MP and ME transforms be mirroring, so that the MF transform would be
non-mirroring.

Can you or Don check my work?  I'm trying to figure out why the ME transform
that I did works in my program and the ME that Don put in mirror.ini works in
his code, but not vice-versa.  The most likely explanation is that I'm doing
something stupid.

Probably.  ;^)


MP matrix (reflection about the plane containing the Z & Y axes):
-1 0  0
0  1  0
0  0  1

MC matrix (current piece value for a 2357 2 x 2 corner brick)
1 0 0
0 1 0
0 0 1

Don's ME matrix for 2357:
0 0 1
0 1 0
1 0 0

MP * MC =
-1 0  0
0  1  0
0  0  1

(MP * MC) * ME =
0  0 1
0  1 0
-1 0 0

which is a 180-degree rotation out from where it should be.  What's my error
here?

Matrix multiplication is not commutative.  (distributive?  Err, I
forget my math terms.)  You're doing one or more of the multiplications
in the wrong order?

Try  ME * (MC * MP) instead.  Notice I switched the order inside the
parens, and outside.

Check how I do it in my code.  You'll probably have to fetch L3Math.c
and L3Def.h from the ldglite CVS archive on the sourceforge to see
the order, because I think I only put the new stuff in the mirwiz.zip
file.

Don



Message has 1 Reply:
  Re: Quick way to mirror-image a model?
 
(...) It's neither commutative [(a * b) * c != a * (b * c)] nor associative [a * b != b * a]. That shouldn't be the problem in the calculation above, since the current matrix was the identity matrix... (...) Looks like you're doing MF = MP * (MC * (...) (20 years ago, 23-Jun-04, to lugnet.cad)

Message is in Reply To:
  Re: Quick way to mirror-image a model?  [DAT]
 
(...) Can you or Don check my work? I'm trying to figure out why the ME transform that I did works in my program and the ME that Don put in mirror.ini works in his code, but not vice-versa. The most likely explanation is that I'm doing something (...) (20 years ago, 23-Jun-04, to lugnet.cad)

65 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR