Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (515)
Games in Android Showcase (122)
games submitted by our members
Games in WIP (577)
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
Hi!

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


EDIT/
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.
/EDIT


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 (http://www.povray.org), 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


Quote
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:

http://usurped.net/renders/caustics.jpg

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
NORWAY
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (30 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (39 views)
2014-10-26 19:37:11

Luminem (21 views)
2014-10-26 10:17:50

Luminem (25 views)
2014-10-26 10:14:04

theagentd (31 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (57 views)
2014-10-16 15:22:06

Norakomi (46 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!