Author Topic: Transformation Matrix ?  (Read 5093 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Transformation Matrix ?
« on: January 04, 2006, 09:54:55 AM »
I have no clue about these.  Can someone shed some light on this subject.  How they are created and how they are pasted to function etc.

Samples would be greately appreciated (I learn more by seeing how they are used)

I know they are used for rotating scaleing and translating object, but how do they work.

Thanks guys
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Transformation Matrix ?
« Reply #1 on: January 04, 2006, 11:17:16 AM »
Big Topic,  Tim .. These will get you started :

http://groups.google.com/groups?q=%22Transformation+Matrix%22+%22Vladimir+Nesterovsky%22&qt_s=Search
particularly http://tinyurl.com/df5mc

http://acad.fleming-group.com/index.html
Generalized 3D Coordinate Transformations
Block-to-Insert and Insert-to-Block Coordinate Transforms

If I recall, Stig and Michael have some posts as well ...
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Transformation Matrix ?
« Reply #2 on: January 04, 2006, 11:38:10 AM »
Tim,
That's my 'Matrix Library'
You will find a lot of usefull functions for vector geometry... :-)

Sample (added):
Code: [Select]
(setq PlaneList (MePlane3p P1 P2 P3))
(foreach Pnt PointList
 (princ "\nDistance at point: ")
 (MePlanePerpDist PlaneList Pnt)
)

Returns all perpendicular distances between Pnt's of clotoide and the infinite plane specified by P1-3
Distances change to minus on the other side of the plane...

« Last Edit: January 05, 2006, 06:03:59 AM by Jürg Menzi »
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Transformation Matrix ?
« Reply #3 on: January 05, 2006, 09:37:42 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Transformation Matrix ?
« Reply #4 on: January 05, 2006, 01:41:28 PM »
Guys,

Thanks for all the links and input, this is a very fascinating subject for me ('cuase I don't know diddly about it  :|) I've been googling the subject for the past 3 days and have quite a few links saved.  This is all going to tie together with another subject I've been posting on (Ghosted objects etc.).  Eventually I would like to take a object (Lines, arcs, etc) show them ghosted, insert them to a point then rotate, or translate them til the desired point is selected.  I am looking at taking an old door program and giving it a serious face lift, and possibly adding a window program to it as well.

It will take the options from the user width, thickness etc turn that into vector data, show it ghosted til a wall line is selected then rotate it around the center of the door ( in 180° increments) til the desired position is selected then the door is drawn. Same will go for the windows.
I am going to consider this more of a learning program.  I would like to know more about entity manipulation so I think this will help.

Well I have a crap load of reading to do so I better get cracking.  If anyone has any suggestions please feel free to jump right in with some examples.

Thanks again.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: Transformation Matrix ?
« Reply #5 on: January 05, 2006, 04:32:37 PM »
Hi Tim,
here's a link to a couple of quick articles I wrote a while back when studying the same subject and trying to get it clear in my head how it all works, hope they can be of help.

http://dcservices.net.au/OtherHome.htm
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Serge J. Gianolla

  • Guest
Re: Transformation Matrix ?
« Reply #6 on: January 05, 2006, 04:46:09 PM »
Quote
Eventually I would like to take a object (Lines, arcs, etc) show them ghosted, insert them to a point then rotate, or translate them til the desired point is selected.

If you are thinking of ghosting with grdraw... you cannot combine it with OSNAP.
« Last Edit: January 05, 2006, 05:15:42 PM by Serge J. Gianolla »

Glenn R

  • Guest
Re: Transformation Matrix ?
« Reply #7 on: January 05, 2006, 08:08:48 PM »
You can't 'ghost' a selection set unless you have some sort of ARX program to do it or a C# program (they both use an entity 'Jig').

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Transformation Matrix ?
« Reply #8 on: January 06, 2006, 07:26:11 AM »
Another sample function to show how to rotate a point list around a base point:
Code: [Select]
;
; == Function MeRotatePointList
; Rotate a point list by a specified angle around a specified base point.
; Copyright:
;   ©2001 MENZI ENGINEERING GmbH, Switzerland
; Arguments [Type]:
;   Ptl = Point list [LIST]
;   Bpt = Base point [LIST]
;   Ang = Angle [REAL]
; Return [Type]:
;   Point list [LIST]
; Notes:
;   - None
;
(defun MeRotatePointList (Ptl Bpt Ang / MatRot)
 (setq MatRot (MeMatRotZ Ang Bpt))
 (mapcar '(lambda (l) (MeTrans l MatRot)) Ptl)
)

Edited: Wrong sample used... sorry :ugly:
« Last Edit: March 28, 2006, 01:10:24 PM by Jürg Menzi »
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

LE

  • Guest
Re: Transformation Matrix ?
« Reply #9 on: January 07, 2006, 09:31:16 PM »
Here are some functions I have posted in the past... it might be on some help here, it is most for lines, but the basic idea is there, included is a 3D drawing sample to run some tests...

HTH