Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three.js: Support vector field plots #27932

Closed
paulmasson mannequin opened this issue Jun 5, 2019 · 13 comments
Closed

Three.js: Support vector field plots #27932

paulmasson mannequin opened this issue Jun 5, 2019 · 13 comments

Comments

@paulmasson
Copy link
Mannequin

paulmasson mannequin commented Jun 5, 2019

This enhancement allows plotting of 3D vector fields. This is done by replacing the translated line segments of the field with 3D arrows at half the thickness of the lines. Since there is currently no way to turn off the arrow heads on the vector field, it is assumed they will be present.

CC: @egourgoulhon

Component: graphics

Keywords: threejs

Author: Paul Masson

Branch/Commit: 057bba5

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/27932

@paulmasson paulmasson mannequin added this to the sage-8.8 milestone Jun 5, 2019
@paulmasson paulmasson mannequin added c: graphics labels Jun 5, 2019
@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Jun 5, 2019

Branch: u/paulmasson/vector-field

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 5, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

58d6b55Cleanup

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 5, 2019

Commit: 58d6b55

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Jun 5, 2019

comment:3

In the process of adding this enhancement, I discovered that line3d has an option arrow_head for adding such to line segments that is not currently supported by the Three.js viewer. Since I'll assume most people will use arrow3d to achieve the same effect, I don't plan to support that attribute unless necessary.

@paulmasson paulmasson mannequin added the s: needs review label Jun 5, 2019
@paulmasson

This comment has been minimized.

@egourgoulhon
Copy link
Member

comment:6

Thanks for this improvement! The following example from the Plotting 3D fields section of the reference manual:

x,y,z = var('x y z')
g = plot_vector_field3d((x*cos(z),-y*cos(z),sin(z)), (x,0,pi), (y,0,pi), 
                        (z,0,pi))
show(g, viewer='threejs')

works but

x,y,z = var('x y z')
plot_vector_field3d((x*cos(z),-y*cos(z),sin(z)), (x,0,pi), (y,0,pi), (z,0,pi), 
                    viewer='threejs')

results in a Jmol plot, as if the option viewer='threejs' was not taken into account...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

057bba5Set extra keywords

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2019

Changed commit from 58d6b55 to 057bba5

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Jun 18, 2019

comment:8

Those pesky extra keywords...

@paulmasson paulmasson mannequin added s: needs review and removed s: needs work labels Jun 18, 2019
@egourgoulhon
Copy link
Member

comment:9

Thanks!

@egourgoulhon
Copy link
Member

Reviewer: Eric Gourgoulhon

@vbraun
Copy link
Member

vbraun commented Jun 27, 2019

Changed branch from u/paulmasson/vector-field to 057bba5

@embray
Copy link
Contributor

embray commented Jul 3, 2019

comment:12

Not in Sage 8.8. Let's please to try keep tickets' milestones related to the release in which we actually intend to include them, and in particular the release in which they were actually included, especially when closing tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants