Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Duplicating the orientation of a graph on to a mesh
Forum Update on Monday, May 27th 2025

Duplicating the orientation of a graph on to a mesh

Scheduled Pinned Locked Moved Unsolved General and Desktop
scene3drotationscatter3d
1 Posts 1 Posters 235 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    new.qt_user-2022
    wrote on 27 Jan 2022, 22:19 last edited by
    #1

    Hello all,

    I have a 3d scatter plot who's orientation I would like to duplicate on a mesh, which is basically a orientation indicator (top-left in the image below).

    Compare3DPathVisualization_FULLSIZE_FH_CF-SH_NO--2022.01.27-14.58.37.5837.png

    I use the graph's camara x axis rotation for the mesh's y axis rotation, and the graph's y axis rotation for the mesh's x rotation. This works ok except of course the mesh's z rotation is unaffected.

    I've tried the following formula for the rotation of the mesh's z rotation but it is still wonky as you can see from the image.

    Zangle = Math.atan2(Math.cos(Xangle * (Math.PI / 180.0)), Math.sin(Xangle * (Math.PI / 180.0)) * Math.sin(Yangle * (Math.PI / 180.0))) * (180.0 / Math.PI) - 90;
    

    I'm sure some value has to be inverted but not sure which. Maybe someone else can see what I can't.

    Any help is appreciated, thanks!

    1 Reply Last reply
    0

    1/1

    27 Jan 2022, 22:19

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved