GSoC/GCI Archive
Google Code-in 2014 BRL-CAD

Implement single function in C to sample a cone

completed by: Andromeda Galaxy

mentors: Deepak, Ishwerdas

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 brlcad

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

Submit the changes to mkbundle.c in patch format.

  • src/librt/mkbundle.c
  • src/librt/bundle.c
  • src/rt/rtshot.c
  • src/librt/mkbundle.c
  • src/rt/rtshot.c