Hello,
in the spatial tab I can rotate an atom around the Z-axis (aka in XY-plane). How can I rotate atoms around the X- or Y-axis?
Background: I want to create a 6-axis-robot with 6 nested atoms, each can be rotated so I can go the a specific point.
Thanks.
Rotation around all axis
Re: Rotation around all axis
Hi,
You can make any rotation when you write some code in the On3DDraw event handler. You will find it in the tab Events of the atom Editor and then 3dDraw.
The following code would draw a simple box with a rotation of 15 degrees over the y-axis.
You can replace the di3Dbox command by a drawing command for any other shape or a 3d drawing model (using the command drawmodel3D).
If you are using 3D models, you could also specify a rotation in the resources manager. To do that you should go to Window > Resources manager. In the tab 3D models you may select the right 3D model, click edit and specify the required rotation.
Good luck,
Marlies
You can make any rotation when you write some code in the On3DDraw event handler. You will find it in the tab Events of the atom Editor and then 3dDraw.
The following code would draw a simple box with a rotation of 15 degrees over the y-axis.
Code: Select all
do(
PushCoords,
RotateCoords(15,0,1,0),
di3DBox(0, 0, 0, xSize, ySize, zSize, ColorRed),
PopCoords
)
If you are using 3D models, you could also specify a rotation in the resources manager. To do that you should go to Window > Resources manager. In the tab 3D models you may select the right 3D model, click edit and specify the required rotation.
Good luck,
Marlies
Re: Rotation around all axis
RotateCoords() with all 7 parameters and the nested atoms (without di3DBoxes) were exactly what I need. Thanks.
(Curious that I don't find this operation with the ED-help...)
(Curious that I don't find this operation with the ED-help...)
Re: Rotation around all axis
Hi,
Maybe you didn't check the topics about visualization? When modelling in 3D the following help topics could be useful:
1. Help > Quickstart > Quickstart guido to 3D Animation.
2. Help > Help Overview > 4D Script Reference Guide > 4D Script Categories > Category Visualization
Regards, Marlies
Maybe you didn't check the topics about visualization? When modelling in 3D the following help topics could be useful:
1. Help > Quickstart > Quickstart guido to 3D Animation.
2. Help > Help Overview > 4D Script Reference Guide > 4D Script Categories > Category Visualization
Regards, Marlies