Skip to content
Discussion options

You must be logged in to vote

Hi Silvia,

If the coordinates in your data are r, theta, phi then you can transform them to look like a sphere using

x = r * sin(theta) * cos(phi)
y = r * sin(theta) * sin(phi)
z = r * cos(theta)

You can do this with a combination of expressions and the Displace operator.

First define:

r = coord(mesh)[0]
theta = coord(mesh)[1]
phi = coord(mesh)[2]
x = r * sin(theta) * cos(phi)
y = r * sin(theta) * sin(phi)
z = r * cos(theta)
sphere_displacement = {x - r, y - theta, z - phi}

in the "Expression" window, making sure to specify the "sphere_displacement" "Type" as "Vector mesh variable"

You can then create you plot, add the Displace operator (Operators->Transforms->Displace), displacing by "sp…

Replies: 10 comments

Comment options

griffin28
Apr 22, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by markcmiller86
Comment options

You must be logged in to vote
0 replies
Comment options

griffin28
Apr 22, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

griffin28
Apr 24, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

griffin28
Apr 24, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #12134 on August 02, 2021 04:16.