Hello

> 1-i want to draw a segment of a water-channel

So basicly:
you want a tube ? a cylinder without caps ?

try this:
com.sun.j3d.utils.geometry.Cylinder Cly = new
com.sun.j3d.utils.geometry.Cylinder(radius, height);

Shape3D cyl_without_caps = Cly.getShape(Cly.BODY);

But : You can't see the inner sides of the cylinder, because the are not
rendered if you look at them from the "wrong" side. If you have to have the
inner side als well: use a 3D-modeller, it's easier that way.

> 2-a)channel has to be wire-framed and also
>   b)i have to give an option to put texture on channel
>  when user wants(i did this part,iuser can change the
> texture on a cylinder)

Well the trick to get a wireframe-version has already been posted so this is
for changing:

Insert this BEFORE adding "cyl_without_caps" to the universe:
cyl_without_caps.setCapability(cyl_without_caps.ALLOW_APPEARANCE_WRITE)

Apperance app_with_texture = new Apperance ();
Apperance app_wirwframe = new Apperance ();
//setup your texture and wireframe.

if the user wants to change:
cyl_without_caps.setAppearance (choosenApp);

> 3-the water has to be "alive",i want to put an
> option(maybe a slider) that when i change the level of
> water,
> the level of water in the channel has to change also..

Is the tube standing upright are lying ?

if it's lying: That's "advanced" stuff, try something else first.

It can be done with modelclips and a shitload of support-code. But it's not
easy at all.

if it's standing upright:
create a second cylinder. Make it's radius a little bit smaller. Use a
TransformGroup to change the height. use a second one the change the
position. Put it inside the first one.

cu

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to