To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 4742
4741  |  4743
Subject: 
Math Help Needed PLEASE
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 19 Jun 2000 07:32:49 GMT
Viewed: 
517 times
  
Hy,

I'm running into math problems again, after I recogniced whats the problem
with the movements in MLCad. Now here is what I would like to do:

There is a virtual grid which is bound to a part. The distance of the grid
lines is given by a vector 'GRID' [x-spacing, y-spaceing, z-spacing] (e.g.
default for coarse grid [10, 8, 10]. This grid rotates together with the part
so a rotation-matrix 'RM' is available. I assume the origin of the grid to be
the same as the origin of the part and the offset is a vector 'OFF'.
Now the user views the part (and invisible) the virtual grid seen from a
certain side given by the view-rotation-matrix 'VM'. If this matrix is [1,0,0
0,1,0 0,0,1] the part and grid is show from FRONT.

The user can move the move the part in x and y direction (which actual axes
depend on the view-rotation-matrix). I need to know where is the nearest point
on the grid for a given screen point 'PS' [x, y, z] (translated into model
space already)

I sum. everything now:

Given is a vector 'GRID', a rotation matrix 'RM' (for part and grid), a view-
rotation-matrix 'VM' and a screen point 'PS'.

Searched the snapped screen point 'SPS' which is snapped to the nearest grid
point.

Please help me with that!!!!

Thanks in advance,
   Michael



Message has 2 Replies:
  Re: Math Help Needed PLEASE
 
(...) What do you mean by "translated into model space" ? Back from World coordinates? By applying inv(VM)? How can you find a z value for the screen point. There are many possible values. (How do you go from 2D to 3D?) Assuming that you could find (...) (24 years ago, 19-Jun-00, to lugnet.cad.dev)
  Re: Math Help Needed PLEASE
 
(...) Transform PS from model space to unrotated part space. Round the x, y, z values to the nearest grid points. (add half a grid size, divide by grid size, multiply by grid size) Transform PS back to model space. I think this algorithm may be (...) (24 years ago, 19-Jun-00, to lugnet.cad.dev)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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