Page 1 of 1

How to create a local axis with an angle

Posted: Fri Nov 08, 2024 2:24 am
by BuuNguyen
Hi STKO,
I am simulating a soil-pile interaction using py, tz, qz model. However, the piles are inclined with an angle of 20 deg with respect to vertical direction. Do you know how to create a local axis with an angle of 20 deg with respect to vertical direction? I can make a local axis with an angle, but I can not define a specific angle (20deg), as you can see in the attached figure.
Thank you for your support,
Buu

Re: How to create a local axis with an angle

Posted: Sun Nov 10, 2024 7:37 am
by kesavapraba
Hi, STKO allows the user to specify the local axis by asking to coordinates of axes directions. Please refer to the attached figure.

Re: How to create a local axis with an angle

Posted: Mon Nov 11, 2024 9:24 am
by STKO Team
When you define the local axis you can define (either by clicking on existing points or by typing the 3 points of the local X-Y plane) the direction vectors.
The components of the normalized direction vectors are the cos and sin of your angles.
Just do your math knowing that:
  • direction-X = normalized(second-point - first-point)
  • direction-Y-temporary = (third-point - first-point) (just used to define the XY plane)
  • direction-Z = cross(direction-X, direction-Y-temporary)
  • direction-Y = cross(direction-Z, direction-X) -> make them orthogonal