To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 3731
3730  |  3732
Subject: 
Java .DAT file renderer redux
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 22 Jan 2000 19:51:25 GMT
Viewed: 
570 times
  
I just noticed that I have some data referring to this element...

   http://www.lugnet.com/cad/ldraw/parts/ref/search.cgi?q=6153

...(incorrectly, I think) as having an inverse-slope attribute.  I suspect my
data may be in err -- I don't remember any inverse-slope components of the
element.  But before deleting the attribute in my data, I'd like to be 100%
sure.

So that got me to thinking.

What's the best way to answer that question?  I could dig out a copy of the
element to double-check, or, if I trust the parts library (which I do) I
could also fire up LEdit and look at it from the bottom and the back side.

But what I'd really love to be able to do is rotate a part around
interactively on the screen -- right from a webpage.

So, a question for any Java gurus out there --

How hard would it be to make an applet which renders an LDraw .DAT file into
a small client window?  For sake of simplicity, let's say that it only needs
to do simple hidden line/surface removal and that it could color all of the
faces white (i.e., no shading or anything fancy).

I'm guessing that most of the work (code) would lie in parsing the .DAT data
and converting it to final 3D coordinate sets, and that, once in that form,
there already exist freely available Java libraries for rotating small 3D
objects in real-time...?

I'm thinkin' something like what QuickTime VR does -- where it lets you
rotate the object interactively with the mouse...  Over the years, I've seen
quite a few wireframe and non-wireframe demos in Java which all ran super-
fast and simply took the x-y position of the mouse within the client window
as a rotational directive.  Frame rate even on a slow machine was typically
15 fps or better for a simple object.  Even 4 fps with double-buffering would
be full-on.

Anyway, I'm not exactly thinkin' full-blown LDraw models here[1], but simply
LDraw parts.  I would *love* to serve a Java applet from lugnet.com which
could display LDraw parts for interactive rotational viewing.  It would be
so perfect for the DB.

Coming at this from a slightly different angle (no pun intended :), how hard
would it be to make a Java applet which rendered a simple 3D object (say, an
arbitrary collection of lines, triangles, and quadrilaterals) with
interactive rotation?  In this case, let's assume that the server has already
done all the work of converting the .DAT file(s) into raw coordinates -- so
that all the Java applet has to do is respond to mouse movements and do a
bunch of simple 3D affine transformations before displaying each frame.

--Todd

[1] Although if I understand .DAT structures correctly, it's not a terribly
big leap code-wise to go from individual composite parts to full models,
except for speed and coloring issues -- the proverbial last 20% which takes
up 80% of the effort.  :)



Message has 1 Reply:
  Re: Java .DAT file renderer redux
 
(...) Like this!-- :^s (2 URLs) (25 years ago, 22-Jan-00, to lugnet.cad.dev)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR