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_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   cellular textures
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: cellular textures  (Read 1733 times)
toxi

WWW
cellular textures
« on: May 26th, 2004, 8:30pm »

hi, because it came up on a mailing list i'm subscribed to, i quickly mocked up a cellular texture demo, based on the descriptions over at black pawn.
 
the demo also features a generic routine to draw texturemapped spheres, just copy&paste it.
 
http://www.toxi.co.uk/p5/cells/
 
press mouse button to see only the texture image
press shift key to toggle cell mode
 

http://toxi.co.uk/
mflux

fluxhavoc WWW
Re: cellular textures
« Reply #1 on: May 27th, 2004, 10:28am »

that's interesting toxi.
what I'm curious is can you make the surface texture reactive to the mouse, on the location it's hitting the sphere? That's probably doable and can yield fascinating results.
 
flight404

WWW Email
Re: cellular textures
« Reply #2 on: May 28th, 2004, 1:50am »

Nice.  But dang, thems some ugly colors.  
 
mm
Guest
Email
Re: cellular textures
« Reply #3 on: Jul 6th, 2004, 5:09pm »

toxi, that g.sphereX thing doesn't seem to work with p68 -- is there some special tag you have you add to the code to activate access to the graphics lib?
 
-h
 
mm
Guest
Email
Re: cellular textures / touch the sphere
« Reply #4 on: Jul 6th, 2004, 5:16pm »


if you want to calculate the location of the mouse pointer on the sphere you can calculate a mapping based on its location within the circle that the texture is beind displayed in, and compare this 2d mapping as the surface point of the sphere, then calculate a line from the surface to the center / origin.  The angle of the sphere's rotation is a factor here.
 
One side-effect is that you will undoubtably calculate a line which intersects the sphere in two places, possibly four, and will have to do some filtering of the results based on which side of the sphere is "closer" to the viewing plane.
 
Bet it's possible!
 
 
justo


Re: cellular textures
« Reply #5 on: Jul 6th, 2004, 6:22pm »

you could also go the arcball interaction route and just pretend that the mouse point is on a plane parallel to the screen, then just normalize the point to the surface of the sphere....only problems there are that the point would always be on the forward side of the sphere and it could never reach the "meridian" that forms a perfect circle when drawn to the screen...but those aren't usually that big of a deal with mouse interactions.
 
edit: but i assume toxi already knows all about that
« Last Edit: Jul 6th, 2004, 6:23pm by justo »  
Pages: 1 

« Previous topic | Next topic »