Implement single function in C to sample a frustumBRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Deepak, IshwerdasTags: function, C, programming, frustum, sample

Our ray tracing library (librt) has a few functions pertaining to creating a pattern of rays and shooting them as a bundle (i.e., all at once). We have examples you can follow like rt_gen_circular_grid() in src/librt/mkbundle.c that are very similar, just not the right pattern.

Our "rtshot" command line utility is a simple single-shot utility that can help you test your implementation and make sure it's working correctly. See the code there for mentions of rt_gen_circular_grid() and rt_shootrays().

Sources may be obtained from our Subversion repository: svn checkout https://svn.code.sourceforge.net/p/brlcad/code/brlcad/trunk brlcad

Implement a function, e.g., rt_gen_frustum(), that will create a rectangle of rays originating from a specified point, direction, divergence angle, and options for controlling the sampling density.

Submit the changes in patch format.

References:
  • src/librt/mkbundle.c
  • src/librt/bundle.c
  • src/rt/rtshot.c
  • http://brlcad.org/wiki/Compiling
Modify:
  • src/librt/mkbundle.c
  • src/rt/rtshot.c
Uploaded Work
File name/URLFile sizeDate submitted
task-49-implement-frustum-sampling.diff2.6 KBJanuary 10 2015 20:59 UTC
Comments
Andromeda Galaxyon January 10 2015 04:17 UTCTask Claimed

I would like to work on this task.

Mihai Neacsu on January 10 2015 10:24 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!

Andromeda Galaxyon January 10 2015 20:59 UTCReady for review

The work on this task is ready to be reviewed.

Sean on January 11 2015 08:02 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on January 11 2015 08:03 UTCalmost threw me there

Your use of a center ray had me concerned there for a second, but then it was clear you were just using is as a point and a vector.  Well done.