# Is Java3D the right choice for me?

Hi,

I am working on a program to calculate properties of buildings (in particular fire resistance). This project is more about 3D math than visualisation.

I have been looking for java libraries that support vector algebra, 3d points, lines and surfaces and bodies.

At the moment I use Java3D (vecmath in particular) but I doubt this is the right choice. I do not have the right insight how to use Java3D. Is there any paper about when to use certain classes?

For example:

* Which classes should I use when I want to calculate the point (Pt) on a surfaces (S => s + alpha*a + beta*b) that is nearest to an other point (P) in space (i.e. vector PPt is factor*normal of a and b)?

* How can I calculate what (parts of) surfaces of a body are visible from a cetain point in space?

Perhaps it is elementary for some of you. If that's the case please share your knowledge with me. I am, eeuuuuh, kind of desperate.... (what a start of a new year! :) )

Best regards,

Herbert

Sorry for the duplicate. Site stated I could not post

Message was edited by: quartelh

Short answer:

Making sure the construction is safe enough for people to get out on time and the fire department to reach te site before more storeys start catching fire.

Long answer:

This is about a Dutch building standard. It is about calculating the determination of the resistance to fire between spaces (read: rooms and storeys). The calculations must be done for all firespaces (a set of rooms form a firespace). These spaces have a volume (bound by the set of walls, the floor and ceiling) and any number of opening (windows). Apart from that, every firespace has it's own quantity of flamable material. These values determine the shape and heat of the flames breaking out of the windows. Other storeys and adjent (fire)spaces must resist this heat (expressed as the heat flux) for an amount of time (depending on its purpose).

For every constuction this must be proven (calculated).

These calculations are quite complex. The most complex is the calculation of the heat flux in a given point based on the visible flames and their heat signature. The flux is the sum of the integrals over the surfaces of the flames seen from that point (taking into account the temperature of that surface, the distance between the point and the point on the surface, the normals of the flamesurface and the observation surface, and the thickness of the flame on the line between the observation point and the point on the flame surface)

But let's start with the easy stuff; the prerequisites that apply to starting the calculation, and getting all the derived values.

Please feel free to throw me some clues about if Java3D is the right choise and any other java library that can be of any help.

Best regards,

Herbert

Hello

I think you are better off with mathlab & co. Java3d is all about 3D-graphics,

but it doesn't do much in the 3D-math-department.

It is possible to do all these things in java3d, but java3d is not meant to be

used like that and the results may be incorrect.

cu

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

>It is possible to do all these things in java3d, but java3d is not meant

>to be

>used like that and the results may be incorrect.

Java in general, will have some shortcomings if you're doing serious

floating point calculations where errors may cost lives.

The accuracy of your calculations isn't guaranteed to be done at better

than 64 bits (even using doubles), and its outright impossible to trap

(differentiate) FP errors.

I also read somewhere, and haven't verified it, that Java makes no

differentiation between + and - 0 which is computational suicide when

dealing with complex (imaginary) numbers.

Any of this can be very detrimental, depending on the numerical methods you

use, and how you go about calculating error. Mathlab (and co.) would

definitely be the way to go.

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

Thank you both for your insight.

I agree, keep math to math products. However, what's the pricetag of MathLab? Budget is an issue. I am doing this in my spare time.

Accuracy is stated in the standard. The deviation of the calculated heatflux for example must be within 1%. So, these are no shocking margins as long as you are able to determine the error.

All calculations deal with real numbers.

Hello

> The deviation of the calculated

> heatflux for example must be within 1%.

Quote:

> The flux is the sum of the integrals over the surfaces of the flames

> seen from that point

If you do these integrals with numerical methodes (aka approximations and

interpolations) you will never be able to really proof 1%-maximal-error.

That's not a matter of java or Mathlab or java3d. That's a problem in the

roots of numerical calculations (and the speed of PCs). Either you have to

solve the integrals yourself or you have to limit the type of surfaces to

"simple" surfaces. (Or wait a day or two per building...)

If you are thinking about Monte-Carlo-methodes (and don't care about the

1%-error-limit): java3d may be your friend. But for real hardcore math:

forget java3d. There are better math-implementations (even for java).

cu

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

Now we getting somewhere :)

the model of the flame IS made up by simple surfaces (if 'flat' 3d surfaces like triangular and rectangular are simple surfaces), there are no curved surfaces. Furthermore, the temperature differs per surface, however it is constant for a given surface.

The flamemodel is truely a model and does not contain any resemblance to the dynamic nature of a physical flame. The flamemodel is not that complex. For a flame that does not fold arround a balcony this model only contains 10 points:

sideview:

3__4

/ /

2/ /5

|/

1

frontview:

4_____9

| |

| |

5|----|10

| |

1|----|6

If you are saying

> There are better math-implementations

> (even for java).

what are you thinking about? Because that's the question that started this thread.

I hope I am not rude, but I am looking for solutions. Knowing what is not a solution is a good start. In user specification/functional specifications knowing what is not needed/wanted is as important as knowing what is needed/wanted (this is many times under-estimated). So if Java3d is not the solution then what is?

As you may have noticed I am not much of a crack Java programmer, so any clues are welcome.

Again, I appreciate your reply.

Best regards,

Herbert

Hebert,

I think you can do your math calcs using doubles - or BigDecimal if more precision is needed- and use Java3D to visualize your results.

I guess you have:

* some inputs - a shape, thermal behavior, some distances, etc;

* a model to apply - the math calc with above inputs;

* a result to show - 3D image, rendered with Java3D;

I think you can use Java3D, since you are able to model your problem. May you need study a bit about Geometry, as plane/line equations, distance from a point to a given surface, and things like that.

But remember: your model implementation will rule the 3D visualization, not the inverse.

Alessandro

java3d-interest@javadesktop.org wrote:

Now we getting somewhere :)

the model of the flame IS made up by simple surfaces (if 'flat' 3d surfaces like triangular and rectangular are simple surfaces), there are no curved surfaces. Furthermore, the temperature differs per surface, however it is constant for a given surface.

The flamemodel is truely a model and does not contain any resemblance to the dynamic nature of a physical flame. The flamemodel is not that complex. For a flame that does not fold arround a balcony this model only contains 10 points:

sideview:

3__4

/ /

2/ /5

|/

1

frontview:

4_____9

| |

| |

5|----|10

| |

1|----|6

If you are saying

> There are better math-implementations

> (even for java).

what are you thinking about? Because that's the question that started this thread.

I hope I am not rude, but I am looking for solutions. Knowing what is not a solution is a good start. In user specification/functional specifications knowing what is not needed/wanted is as important as knowing what is needed/wanted (this is many times under-estimated). So if Java3d is not the solution then what is?

As you may have noticed I am not much of a crack Java programmer, so any clues are welcome.

Again, I appreciate your reply.

Best regards,

Herbert

---

[Message sent by forum member 'quartelh' (Herbert Quartel)]

http://www.javadesktop.org/forums/thread.jspa?messageID=48209Â“r

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

__________________________________________________

Converse com seus amigos em tempo real com o Yahoo! Messenger

http://br.download.yahoo.com/messenger/

[att1.html]

hi.

whats the motive here. starting fires or putting them out????