mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.82k stars 35.31k forks source link

Is there any call to create THREE.Arc versus THREE.Line #98

Closed snorris closed 13 years ago

snorris commented 13 years ago

How would one create a series of Arcs versus line segments (alot of them) in an arc pattern?

Thanks

mrdoob commented 13 years ago

Is that for WebGL? I think WebGL only supports straight lines so a THREE.Line with a lot of segments forming the Arc sounds like an option to me... ?

snorris commented 13 years ago

There are bezier curves that you can create on canvas. I was curious if you had a call to create them. The multi segment arc is fine as well. Thanks MrDoob

mrdoob commented 13 years ago

Ah, so you're talking about CanvasRenderer. Eitherway... yeah, I think it'll be nice to be able to draw curves in 3D and let the engine handle that for you. Added to the list ;)

snorris commented 13 years ago

That is cool mrdoob. Thanks

jaycrossler commented 13 years ago

I'm looking to draw planetary orbits - I have all the ephemeris calculations working and the ability to show where all the planets are at any given time. Would you suggest using THREE.Arcs to show the orbits (once they are ready)? Or, is there a THREE.Oval? I've been drawing 3D circles so far by calling Cylinder with a height of 0.

Last question - if I want to render an asteroid belt, do you think a series of particles or fog rendered along a Arc path is the way to go?

mrdoob commented 13 years ago

I used THREE.Line to draw planetary orbits here:

http://xplsv.com/prods/demos/xplsv_orsotheysay/

You can check the code of that specific part here:

https://github.com/mrdoob/xplsv_orsotheysay/blob/master/js/effects/Part6Effect.js

jaycrossler commented 13 years ago

That worked perfectly. I've added orbits and updated to https://github.com/jaycrossler/Celestial (orbit code is in init_planets() function of index.html)

mrdoob commented 13 years ago

Looking good! :)

theblang commented 11 years ago

Wow, this is exactly what I needed. Three.js is amazing!