How to create a local axis with an angle

Post Reply
BuuNguyen
Posts: 134
Joined: Fri Oct 29, 2021 3:28 am
Location: Paraguay
Contact:

How to create a local axis with an angle

Post by BuuNguyen » Fri Nov 08, 2024 2:24 am

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
Attachments
local axis.JPG
local axis.JPG (11.69 KiB) Viewed 2245 times

kesavapraba
Posts: 468
Joined: Sat Mar 28, 2020 2:25 pm

Re: How to create a local axis with an angle

Post by kesavapraba » Sun Nov 10, 2024 7:37 am

Hi, STKO allows the user to specify the local axis by asking to coordinates of axes directions. Please refer to the attached figure.
Attachments
localaxis.png
localaxis.png (106.09 KiB) Viewed 2213 times
:: With best wishes ::
Prabakaran Kesavan

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

Re: How to create a local axis with an angle

Post by STKO Team » Mon Nov 11, 2024 9:24 am

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

Post Reply