Wish: Mirror vector

I wrote about this request a few years ago, but can’t find the topic, so I make a new one with the hope that it’s possible for the “McNeel” programmers to create such tool in the future. The idea is to be able to trace a line so that wherever it intersects with a surface it will create a mirrored vector simulating how a real light ray would reflect on a mirror surface. It must be history-enabled, so that any change of the direction of the original vector (either via moving or rotating it, or by moving its control point) would automatically adjust the reflected vector upon hitting the target surface.

This is very usable in architecture and product design, as well as mould design for CNC-milling. I find it especially useful in designing car mirrors to figure out the best orientation of the side mirror’s glass relative to the driver’s head and the position of the side mirror’s body.

Currently, I do this manually using the following steps:

  1. Use ! _Polyline to create a line, for example, from the driver’s head to the center of the side mirror;
  2. Use ! _IntersectCreate to create a point intersection with the target surface, i.e. the car’s side mirror;
  3. Use ! _Line _Normal to create a line normal to the surface at the desired location;
  4. Use '_CPlane _3Point to create 3-point CPlane from the original curve and the curve normal to the surface;
  5. Finally, use ! _Mirror to create a mirror vector that will simulate a real reflection on the car’s mirror.

The downside of the manual approach is that the reflected vector updates properly only if I adjust the original line long the XY-axis of the CPlane used for the mirror command (step #5 mentioned above). However, moving some control point of the original line in the Z-direction will “reflect” the mirror vector in the wrong direction, ultimately forcing me to repeat the whole process again. Moving the target surface will also alter the normal direction, so this also forces me to repeat the process.

Mirror vector.3dm (206.6 KB)

1 Like

Hi Bobi,

Why not draw a line from the driver’s head to the mirror position, draw a line from the centre of the desired target to the mirror end of the first line, bisect the two lines to give the mirror normal and position the glass to that?


Bounce can help here.


1 Like

Hi Pascal, I’m aware of the “Bounce” command but the main problem is that it only takes into account changing the orientation of the target surface. It will not update upon changing the direction of the vector. Trying to do so breaks the history of the ray. My request is to be able to modify the direction of the input curve so that this will automatically apply a history-enabled re-calculation of the ray vector. :slight_smile:

I use this approach sometimes, but I mostly need to be able to change the input curve (the line from the driver’s head to the center of the side mirror), which in return should adjust the output reflected vector. My preferred method is the one I described in 5 steps above, because it supports history along the XY plane of the 3-point CPlane.


Hi Bobi -

That was implemented in the Rhino 8 WIP a year ago:
RH-59765 Bounce: Added “Object” option for ray direction to work with History


Thanks, I will try the “Bounce” tool on the latest Rhino 8 WIP then. Just figured out where is the previous topic with my request: