We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › 3D shape library - now available
Pages: 1 2 3 
3D shape library - now available (Read 11657 times)
Re: 3D shape library - now available
Reply #30 - Jan 19th, 2010, 10:46am
 
Quote:
Is there are 3D-Line as tube and as thin box?
Can it have a color or shader?


This is from the example code already posted. In the first line a Tube object is created with 1 slice along its length and 20 segements round the tube. Change the 20 to 4 and you get a box (sort of closer to a diamond) The second line sets the colour of the tube. There is no shader but you can use an image for a texture - so use an image with a gradient fill; setTexture() method.
Code:
  // Create the tube will be used for the line
 line = new Tube(this,1,20);
 line.fill(color(0,0,128));


The tube class also has a method setSize where you can define the x & z radii at each end and the length of the tube, by using different values for x & z radii you can get an elliptical line effect.
Smiley
Re: 3D shape library - now available
Reply #31 - Jan 20th, 2010, 11:49am
 


Thank you very much!

Maybe I have to post some code...

Re: 3D shape library - now available
Reply #32 - Jan 20th, 2010, 11:57am
 


He can't find the library although I removed the .org-thing...


import shapes3d.utils.*;
import shapes3d.apache.commons.math.util.*;
import shapes3d.apache.commons.math.*;
import shapes3d.apache.commons.math.geometry.*;
import shapes3d.*;

import processing.opengl.*;

import peasy.apache.commons.math.*;
import peasy.*;
import peasy.apache.commons.math.geometry.*;


Thanks!


Re: 3D shape library - now available
Reply #33 - Jan 21st, 2010, 6:58am
 
The latest version gets round this problem as it has a method to specify a tube based on its endpoints. The library has an example sketch showing how tp create a Bezier curve in 3D using the Tube class and the Ellipsoid class for connections.
Smiley
Re: 3D shape library - now available
Reply #34 - Feb 8th, 2010, 3:19pm
 
Quark wrote on Dec 13th, 2009, 11:14am:
(...) http://www.lagers.org.uk/s3d4p/index.html then click on the Examples link. Have a look at the Processing source code for Showcase and Earth & Moon to see how easy it is too use.

As and when I create new examples I will post links here.  

Enjoy Cheesy
I don't try this yet but it seems to be great.
Thanks for sharing.
Re: 3D shape library - now available
Reply #35 - Feb 15th, 2010, 2:17pm
 
Many thanks for this! Cool
Pages: 1 2 3