views:

77

answers:

2

Hi All,

Let assume that we have a half 3D mesh object and want to mirror it, in C# 2008 Express. That is, we want to have its simetrical part according to the center line of the object.

Could you help me to do that.

Thanks in advance.

A: 

You can try scaling it negatively in one axis, that should essentially flip it.

So if its scale is (1, 1, 1), change it to (-1, 1, 1).

cloudhead
A: 

hmmmm... here is the algorithm I would use:

  1. Find the point on the mesh that you would want to reflect about. Call it p0.
  2. Translate the object so that p0 lies on the origin (0,0,0).
  3. Now rotate the object 180 degrees about the origin along your desired plane of rotation.
  4. Translate back to p0.

This should give you a reflection of the object about the line you wish to rotate around.

CookieOfFortune
You can't get a mirror just by rotating, the two objects are physically different..
cloudhead
You're right, it would need to use the negative scale.
CookieOfFortune
hmmm... but how would you do that with to an arbitrary plane?
CookieOfFortune