hz-b / rayx

RAYX is a simulation tool for beamlines at electron storage rings. It traces synchrotron radiation through a series of mirrors, gratings and more and provides the user with helpful insights, how a given beamline performs.
MIT License
23 stars 6 forks source link

Rendering issue toroid #197

Closed Atraxus closed 12 months ago

Atraxus commented 1 year ago

Describe the bug When rendering the toroid beamline, the rays or the toroid are not placed correctly. Further not all rays seem to be renderd

To Reproduce Steps to reproduce the behavior:

  1. Open rayx-ui
  2. Load this rml file zippy.zip
  3. Go to the toroid optical element

Expected behavior The rays should hit the object and no orange rays should just end without another bounce

Screenshots

image

Desktop (please complete the following information):

Atraxus commented 1 year ago

@memoryleak47, do you know why some rays are reflected by the toroid (marked red) and some run out of bounces (marked pink). The rays that run out of bounces are (temporarily) rendered in white here

image
memoryleak47 commented 1 year ago

@Atraxus

do you know why some rays are reflected by the toroid (marked red) and some run out of bounces (marked pink). The rays that run out of bounces are (temporarily) rendered in white here.

Yes, this is what I described in the meeting last week. Due to an imprecision in the Toroid collision, some rays repeatedly collide with the toroid until they are out of bounces.

This was fixed in ad5329d, the zip file contains rays from an older version.

Atraxus commented 12 months ago

Fixed with 7105f4ec8ce9a792b6a33482f51c95229039ca03