-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Added Lorenz Attractor WebVR example #14154
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
Conversation
examples/webvr_lorenz_attractor.html
Outdated
var current = 1; | ||
var shown = 10000; | ||
|
||
var beta = 8/3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 8 / 3
this is really beautiful. nice work! 🌃 |
@mrdoob no interest in this example? |
Wouldn't it be better the lorenz attractor in front of the user? |
@mrdoob not quite understanding: on my Oculus Go, it is right in front of me. Where is it for you, using what equipment? |
Oh! Sorry... I didn't get to try it in VR. By checking the example on my desktop I had the impression the user was inside the object. |
Okay, got to test it in VR. It feels like the attractor is mapped into a sphere and we're inside of it...? The lorenz attractor doesn't seem to have depth... Is that intentional? |
The viewer is close enough to the attractor to have to look around to see it all, but not inside it. I haven't done any particular mapping and there is no intention to flatten it. I personally perceive depth in the attractor. The black background makes it more dramatic, but maybe that flattens the object for you. |
Trying to understand the code... What is the size of the object? I can see the camera near/far goes from 1 decimeter to 1 kilometer... |
The attractor is generally about 100 units across, but because it starts are random positions the outer loops can potentially be larger so I just threw in a bigger number. I tend to use 1000 by default, partly because it's in the documentation demo. Is there a significant performance hit if there's nothing there to render? |
That's why I don't sense any depth. You're rendering an object 100 meters away that can be up to a 1 kilometer in size. Depth is not as obvious when going from 100 meters to 1 kilometer. Do you mind making the object smaller? Place it 1 meter in front of the user and reduce its size until it's all visible. In VR it will become much more physical. Not only that but in positional VR you'll be able to walk around it 😊 |
Requested changes done. I didn't want to make the attractor too small so as not to lose too much detail. The perceived depth is much improved. Thanks! |
Awesome! Much better. |
Thanks! |
Improved the example a little bit by adding a light and ground. a75dbac |
I like it! Gives some context without distracting from the central object. Have to remember this technique. Personally I prefer the attractor to be a bit larger. With the default resolution of current devices, it looks a bit too mushed together at this size. Then again, devices will improve. |
This is a math-based WebVR example. The Lorenz attractor is fairly easy to code, and while it's fun enough in a browser it's more interesting when you're right inside the evolution:
https://rawgit.com/paulmasson/three.js/webvr/examples/webvr_lorenz_attractor.html
The evolution will repeat and repeat, vanishing and restarting every time the color is red.
This is an example of the possibilities of WebVR for mathematical education and art.