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

Correct streamtube positions and colouring #4271

Merged
merged 16 commits into from
Oct 23, 2019
Merged

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Oct 11, 2019

Fixes #4206 and fixes #4275

The gl-streamtube3d module used to make assumptions about the order of input data which could be false in cases where the data cube was not filled in orders than xyz (i.e first x | next y | last z).
This PR addresses this issue by considering the order of data in calc step and using this info inside gl-streamtube3d module.

Before fixing 4206
After fixing 4206

Before fixing 4275
After fixing 4275

In addition gl-cone3d module is patched in this PR.

Please refer to the following gl-vis PRs for more details on the changes within dependecies:
gl-vis/gl-cone3d#16
gl-vis/gl-cone3d#17
gl-vis/gl-cone3d#18
gl-vis/gl-streamtube3d#10
gl-vis/gl-streamtube3d#11

@plotly/plotly_js

package.json Outdated
@@ -86,7 +86,7 @@
"gl-scatter3d": "^1.2.2",
"gl-select-box": "^1.0.3",
"gl-spikes2d": "^1.0.2",
"gl-streamtube3d": "^1.3.1",
"gl-streamtube3d": "git://github.com/gl-vis/gl-streamtube3d.git#82a0dd7a8dc601f48ed4afdc5a3e40394b758deb",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard
Copy link
Contributor

To clarify, order xyz (i.e first x | next y | last z) means:

var x = [];
var y = [];
var z = [];
for(var k = 0; k < Nz; k++) // last changing index
for(var j = 0; j < Ny; j++) // next  changing index
for(var i = 0; i < Nx; i++) // first changing index
x.push(i); y.push(j); z.push(k)

thanks @archmoj for the tip!

package.json Outdated Show resolved Hide resolved
@etpinard etpinard added this to the v1.51.0 milestone Oct 15, 2019
 - reduced duplicated code between gl modules
 - bump gl-cone3d 1.5.0
 - bump gl-streamtube3d 1.4.0
@archmoj archmoj self-assigned this Oct 16, 2019
@etpinard
Copy link
Contributor

etpinard commented Oct 23, 2019

Superb fix. Thanks very much @archmoj !!

💃 💃 💃 - oh let's start merging things for 1.51.0 🚀

@archmoj archmoj merged commit 8c5f66d into master Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
2 participants