FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   sphere resolution hack?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: sphere resolution hack?  (Read 820 times)
mKoser

WWW Email
sphere resolution hack?
« on: Oct 24th, 2003, 4:22pm »

i am wondering if there is a way to change the resolution of a sphere...?
 
something like sphereResolution(10); would be nice, or alternatively sphere(radius, resolution);. which would allow each sphere to be drawn with it's own resolution.
 
...has anyone discovered a built-in command for this, or does anyone have an idea as to how you can hack it?
 
+ mikkel
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
toxi

WWW
Re: sphere resolution hack?
« Reply #1 on: Oct 25th, 2003, 2:01am »

nope, can't hack it at the moment as it's still hardcoded via a "static final" value (30). i think a flexible resolution has been proposed before though and AFAIK it should be in the pipe...
 
maybe you should have posted this under "suggestions"! wink...
 

http://toxi.co.uk/
mKoser

WWW Email
Re: sphere resolution hack?
« Reply #2 on: Oct 25th, 2003, 2:08am »

allright.. the reason for my question about "changing the resolution of a sphere" is because of the problems i have encountered with the following:
 
i want to make 3D worms... i was playing with movement using curvePoints, and ended up making a sphere make a work-like trail in 3D space (funny how the sphere can HIDE behind a trail ... i guess this is a feature (maybe even bug?) of Bagel?).. anyway, here's a link:
http://proce55ing.beyondthree.com/testing/animated_worm_trails/index.htm l
 
So...  I thought i would be nice if the length of the worm would be limited, to say 20 spheres... however, this ended up being a heavy processor task, which forced me to go to low resolution and REALLY poor framerate:
http://proce55ing.beyondthree.com/testing/animated_worm_memory/index.htm l
 
...i exported the last example as a movie:
http://proce55ing.beyondthree.com/testing/animated_worm_memory/yellow_wo rm.mov (1.5 mb.)
 
anyway .... to achieve a mixture of the two - a high-resolution worm where the length of it is of limited dimension (and not infinite as the first example) I really need to be able to control the resolution of the spheres
 
...anyone?
 
+ mikkel
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
mKoser

WWW Email
Re: sphere resolution hack?
« Reply #3 on: Oct 25th, 2003, 2:09am »

ahh shit toxi ... double posting again!...
 
you're right - this has turned out to be a SUGGESTION! (hello... operator.. feel free to move this!)
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
toxi

WWW
Re: sphere resolution hack?
« Reply #4 on: Oct 29th, 2003, 8:07pm »

hey mikkel, i hope you'll pleased to see this
 
http://www.toxi.co.uk/p5/xsphere/
 
it's not a hack as such, but a rewrite of my old lingo code i used for macronaut. it's not properly optimized yet (not using TRIANGLE_STRIPs) but once this is done, i'll try to get ben to integrate this instead of the current sphere() function...
 
btw. move left-right to change res, click to toggle filled/stroked only
« Last Edit: Oct 29th, 2003, 8:11pm by toxi »  

http://toxi.co.uk/
mKoser

WWW Email
Re: sphere resolution hack?
« Reply #5 on: Oct 29th, 2003, 8:19pm »

T H A N K   Y O U
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
Koenie

170825270170825270koeniedesign WWW Email
Re: sphere resolution hack?
« Reply #6 on: Dec 4th, 2003, 9:53pm »

I went playing with Toxi's xsphere code and I ended up doing a little applet I put on my site: http://koeniedesign.com/?p=about
 
I mapped an image of a worldmap on the sphere, but you can put any image you like around it. Source is here: http://koeniedesign.com/globe.pde
 
Koenie
 

http://koeniedesign.com
mKoser

WWW Email
Re: sphere resolution hack?
« Reply #7 on: Dec 5th, 2003, 12:00pm »

nice and stylish
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
Re: sphere resolution hack?
« Reply #8 on: Jul 12th, 2004, 9:43pm »

(fwiw, this code was added by toxi to the main graphics engine around rev 6
 
Pages: 1 

« Previous topic | Next topic »