Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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]
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (749 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (595 views)
2018-03-24 14:43:53

Solater (95 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (378 views)
2018-03-02 22:15:33

buddyBro (1038 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!