Dear Michael,
Please, could you explain the meaning of "theta", "phi" and "psi" angles in the floor_coordinates output?
How can I obtain the local coordinate system using these angles?
I'm trying to understand the coordinate transformation when the "TILT" parameter is used in BEND. It seems like in some cases the floor_coordinates command gives a wrong answer for the angles of local coordinate system (if I understand the meaning of these angles correctly) -- please see the attached pictures for example: red arrows here show the x-direction and blue arrows show y-direction. As you can see in the second picture the coordinate system after the second blue SBEND has wrong direction and then it goes back to normal.
The coordinate system transformation used in this script is the following: 1) rotate by +psi around Z-axis 2) rotate by -phi around X-axis 3) rotate by +theta around Y axis.
The lattice is in the 3Dlayout.tar.gz archive.
/Alexey
Local coordinates for 3D beamline layout
Moderators: cyao, michael_borland
Local coordinates for 3D beamline layout
- Attachments
-
- 3Dlayout.tar.gz
- tcl-script to show 3d beamlines in x3d-format. For x3d files use freewrl viewer.
- (57.94 KiB) Downloaded 4195 times
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Local coordinates for 3D beamline layout
Alexey,
I think you're right, that there is a bug in the computation of psi in some cases. I'm looking into it.
--Michael
I think you're right, that there is a bug in the computation of psi in some cases. I'm looking into it.
--Michael
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Local coordinates for 3D beamline layout
Alexey,
I think I fixed the bug. Please see attached. This code is all based on MAD8. For some reason that I don't remember, I deviated from their code in one respect, and that caused the bug.
Your script is great! Would you mind if we put it on our software download page? We'll credit you, of course.
--Michael
I think I fixed the bug. Please see attached. This code is all based on MAD8. For some reason that I don't remember, I deviated from their code in one respect, and that caused the bug.
Your script is great! Would you mind if we put it on our software download page? We'll credit you, of course.
--Michael
- Attachments
-
- floor.c
- (20.11 KiB) Downloaded 3974 times
Re: Local coordinates for 3D beamline layout
Michael,
Thanks for the quick fix of this bug,
I'm glad you liked my script!
Sure, you're welcome to you put it to the download page.
Here's a little better version of this script with one important improvement --- it can show element names if necessary.
/Alexey
Thanks for the quick fix of this bug,
I'm glad you liked my script!
Sure, you're welcome to you put it to the download page.
Here's a little better version of this script with one important improvement --- it can show element names if necessary.
/Alexey
- Attachments
-
- 3Dlayout.tar.gz
- (11.97 KiB) Downloaded 4235 times
Re: Local coordinates for 3D beamline layout
Dear Michael and Alexey,
I would be really interested in the 3D Layout script you posted years ago.
Unfortunately I can't download it from here nor find a link somewhere else, is it still possible to use it in order to display the beam-lines?
Or maybe there are other solutions?
Thanks in advance,
Marcello Rossetti Conti
I would be really interested in the 3D Layout script you posted years ago.
Unfortunately I can't download it from here nor find a link somewhere else, is it still possible to use it in order to display the beam-lines?
Or maybe there are other solutions?
Thanks in advance,
Marcello Rossetti Conti
Re: Local coordinates for 3D beamline layout
Dear Marcello,
The script is included into the Elegant distribution as view3dGeometry program. This program can be also executed as a regular tcl-script once you comment the oagtclsh-specific parts on top of the script.
Please see the attached example.
In order to display beamline in 2d you can also use more recent python-based approach: http://www.inp.nsk.su/~petrenko/c-tau/I ... Views.html
http://www.inp.nsk.su/~petrenko/c-tau/I ... ping_ring/
Best regards,
/Alexey
The script is included into the Elegant distribution as view3dGeometry program. This program can be also executed as a regular tcl-script once you comment the oagtclsh-specific parts on top of the script.
Please see the attached example.
In order to display beamline in 2d you can also use more recent python-based approach: http://www.inp.nsk.su/~petrenko/c-tau/I ... Views.html
http://www.inp.nsk.su/~petrenko/c-tau/I ... ping_ring/
Best regards,
/Alexey
- Attachments
-
- view3dGeometry.zip
- (268.47 KiB) Downloaded 175 times
Re: Local coordinates for 3D beamline layout
Dear Alexey,
thank you very much for this useful example, I managed to run it on my windows machine.
It will be really helpful.
Edit: the python approach seems really interesting, thanks! I'll try to implement something similar.
My best wishes,
Marcello Rossetti Conti
thank you very much for this useful example, I managed to run it on my windows machine.
It will be really helpful.
Edit: the python approach seems really interesting, thanks! I'll try to implement something similar.
My best wishes,
Marcello Rossetti Conti