Skip to content

agdturner/ccg-r3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Java library for rendering 3D spatial data based on ccg-v3d.

The aim is to support visualisation of models with 6 degrees of freedom.

The focus is rendering geometry and data attributed to those geometries. The geometries derive from points, planes, lines, line segments (parts of lines), areas (bounded plane sections) and volumes (bounded by areas).

Uses

  • Helping explain and develop ccg-v3d - the underlying 3D Euclidean geometry library.
  • Visualising 3D data.
  • Supporting the development of a digital twin Earth. A model of Earth that provides feedback for sensing and surveying it in order to more accurately and usefully represent it.

Axes

The following image is a render of an area (a polygon with no internal holes) coloured gray, with a pink edge in a clear cube for which white edges are rendered as lines. This is looking down the Z axis with the axes coloured (X blue, Y red, Z green). The camera has a screen as wide as the cube which is positioned at a distance of the radius of the cube (distance from the centre to a corner) with a focus in line with the centre of the screen and at twice the radius of the cube:

A polygon with no internal holes in a box.

The camera can be pointed at the geometry from anywhere. The following image is a rendering after rotating the camera Pi/8 radians around the X axis, 13Pi/8 radians around the Y axis and 10Pi/8 radians around the Z axis:

A polygon with no internal holes in a box.

Renderings have been produced for geometries defined by coordinates and calculation done with double precision floating point and https://github.com/agdturner/ccg-math/blob/master/src/main/java/uk/ac/leeds/ccg/math/number/Math_BigRationalSqrt.java. Some of the generated image files appear identical, none are radically different - any differences are subtle. For instance compare the following which was calculated with double precision with the above which was calculated with arbitrary precision to 6 decimal places.

A polygon with no internal holes in a box.

Those two images are identical. The following show a difference in some of the box line lengths for the 6 decimal place and double precision floating point precision images respectively:

A polygon with no internal holes in a box. A polygon with no internal holes in a box.

A thorough comparison of the generated images and study of the differences could be interesting...

NB: Various other renderings had been produced from STL files, but that work wants doing again so the results are reproducible using the latest version of the software...

Hello World

Rendering of Utah Teapot using Utah_teapot_(solid).stl with 9438 triangles (resolution 500x375, Order of Magnitude of precision -10), there is no shadow, there is effectively a low ambient light and a vector for a general light:

A yellow scale rendering of the Utah Teapot

Rendering of the asteroid Geographos using a Geographos 3D Model provided by NASA with 16380 triangles (resolution 500x375, Order of Magnitude of precision -8):

A yellow scale rendering of Geographos

The images of the Geographos and the Utah Teapot were produced by running RenderImage.java. As the underlying library changed, running this file does not currently reproduce these images..

The image below is a rendering of Hurricane Katrina using a Hurricane_Katrina 3D Model provided by NASA:

A yellow scale rendering of Hurricane Katrina

The image of Hurricane Katrina was produced by running RenderImageDouble.java. As the underlying library changed, running this file does not currently reproduce these images..

Development plans/ideas

  • Generate reproducible results.

Contributing

  • Thanks for thinking about this.
  • If this is to form into a collaborative project, it could do with a Code of Conduct and Contributor Guidelines based on something like this: Open Source Guide

LICENSE

Acknowledgements and thanks

  • The University of Leeds has indirectly supported this work by employing me over the years and encouraging me to develop the skills necessary to produce this library.
  • Thank you Eric for the BigMath library.

Links

About

3D Euclidean geometry rendering

Topics

Resources

License

Stars

Watchers

Forks

Languages