Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java 2D / Re: Light rays bouncing off shapes! on: 2004-02-20 07:29:40
thanks for answers..

i DO know the mathematics, but to calculate the reflection angle, we need the tangent of the shape in the point where the ray hits it. so we wondered if anyone knew of some prewritten stuff that could do that. if not, we can think we can find the intersection point from some graphics2d functions, then combine that point with the function of the shape to get the tangent. but this involves even more mathematics, which we are trying to avoid Smiley.

it's a 2d space btw, not 3d. =)

- Lars Petter
2  Java Game APIs & Engines / Java 2D / Light rays bouncing off shapes! on: 2004-02-19 07:44:46

For at project at school, we're making a drawing board, where the user will be placing different shapes (such as bezier splines, circles, lines, and so on (attachment, (2))), that will be functioning as mirrors. Also, there will be a light source emitting rays, functioning as a light source. When these rays hit the shapes, we want them to bounce off them just as light bouncing off a mirror, regarding to the reflection angles. (attachment, (1)) But we really dont have a clue how we should go about this..

We'll be needing the tangent of the shape where a ray hits it (probably from the derivative of the shape in the intersection point), and calculate where the ray will go from there by the help of some some angles and rotations and stuff..

We've looked around in the API, but we cant seem to find anything that could help us with doing this.. or is it?

Attached image should explain what we're trying to do..

Click to Play

After some thinking, we've found out that the only thing that we really are wondering about, is how we can find the tangent of a shape in a given point of the shape.

Anyone got some ideas?

Thanks in advance,

Lars Petter
3  Java Game APIs & Engines / Java 3D / Re: which api for shapes such as ellipses, bezier. on: 2004-02-11 10:54:02
i've just been asking around.. and what we need is not supported by opengl nor directx.. so what we'll be doing is (like you are suggesting) using a raytracer, probably povray (, exporting povray "code" from the 2d plane.

however, thanks for the help, we really appreciate your effort. now, off to read povray documentation:)

- lars petter
4  Java Game APIs & Engines / Java 3D / Re: which api for shapes such as ellipses, bezier. on: 2004-02-10 20:39:30
hi again, thanks for the responses

The shapes that you want to draw are Beziers (4 control points) or general NURBS??

i'm not sure what NURBS are, so i cant answer that=)

an example:

in the 2d plane, i want to place a circle, assign a height to it, place a light source, and then get a rendered image, including the caustics. like this:

it's these lighting effects that are the main point.

we've been thinking of using java3d in the 2d-plane as well, since that would make it much easier for us to get the 3d render done. the problem is then, how we easily can get the shape modelling done.

the modelling is supposed to be somewhat like how you do it in adobe illustrator, with the bezier curves, you add start & end point as well as control points, and these should be draggable. the rotate/move/scale funtionality from illustrator is also desirable.

hope this clears things up a bit.

EDIT: i'm also wondering if java3d supports such a detailed level of lighting/shadowing effects. can i get something as detailed as in the picture i linked?

- lars petter
5  Java Game APIs & Engines / Java 3D / which api for shapes such as ellipses, bezier...? on: 2004-02-09 11:08:45
hi, sorry in advance for bad language, not that good at english nor programming, so i'm having trouble expressing myself explicitly regarding to the programming issues =)

me and some mates are doing this school project, where we are supposed to develop some software in which the user should be able to place shapes such as:

- circles & ellipses, closed or open (like a pie missing one      piece of pie =), without the lines from circle centre to the border )
- bezier curves
- straight lines
- parabolas

.. into a 2-dimensional plane.

these shapes will be given a certain height, and both sides (of the shape, inside/outside) will be given different parametres regarding to absorption og diffusing (dont know if these are the english word for it) of the surfaces.

further on, we are supposed to render this into a 3d-picture, showing some advanced caustics.

the display of these caustics is the main point of the software, as the user of the software wants to get the specific measures of these shapes, so that they can reproduce this setting and caustics in real life. ( they are artists of some kind)

only thing we DO know, is that the GUI will be programmed in Java.

We've found several helpful classes in the Graphics2D for modelling 2d-shapes, but cant seem to find any way to get these shapes into a Java3D context..

So: IS there a way to do it by the help of Graphics2D     shapes?

We've looked into the Java3D API as well, but there seem to be little or none classes that could help our "shaping needs" in such a way as Graphics2D can..

Or is it?

Finally, if the answer to the 2 questions above is NO; which API would you recommend for us?

Or do you have any other ideas?

thanks in advance,

lars petter
Pages: [1]
numerical (333 views)
2017-02-21 07:32:16

numerical (333 views)
2017-02-21 07:31:46

theagentd (444 views)
2017-02-18 13:42:33

theagentd (442 views)
2017-02-18 13:35:16

h.pernpeintner (1610 views)
2017-01-24 22:39:11

h.pernpeintner (1597 views)
2017-01-24 22:38:32

Galdo (2162 views)
2017-01-12 13:44:09

Archive (2134 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2670 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2353 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!