Finished curve(), so hyp.c is functionally complete. Starting to figure out what can be moved from shot/norm/curve/etc to prep, and developing a way to test the effectiveness of my optimizations.
2008-05-09 to 2008-05-13
I changed the 'in' creation to be more closely aligned with BRL-CAD standards:
- Vertex is the center of the base ellipse (was the center of the primitive)
- Height vector points from the base to the top (was from center to top)
- Major and minor axis lengths control the base/top ellipse sizes (formerly controlled the center "neck" ellipse size)
- Scale factor 'c' now controls the neck size as a fraction of the base dimensions (formerly controlled the slope of the asymptotic cone)
UV mapping was also updated to match with ehy's UV mapping, so the checker pattern would match. UV now ranges from (0,1) on each face, instead of being unique on the entire surface. The largest part of this week was spent working on tess(). Currently, all elliptical cross sections use the same number of points (calculated from the base), but the smaller ellipses at the neck could be made with fewer points and remain within the tolerances, hopefully increasing performance.
Fixed one more raytrace bug due to faulty conditional logic. Also, I upgraded the uv mapping to be more uniform. Longitude lines are spaced more evenly about an elliptical cross section, and latitude lines are now ellipses instead of circles to match the cross section on the top and bottom caps.
I found out why raytrace from within mged wasn't working: I was running mged from its build location (src/mged/mged) to save time by skipping the "make install" step. Running mged from the installed location (/usr/brlcad/bin/mged) allows the raytrace to work perfectly.
Yesterday was mainly spent trying to figure out why the raytrace wasn't working. Today, I rewrote most of shot(), ignoring what prep() was doing, and updated norm() to use the new private vector stored in the hitpoint. "rt" seems to work perfectly, but trying to raytrace from inside mged still fails.
Implemented import5(), export5(), and describe(). Wireframe drawing works perfectly, but raytrace fails; still trying to track down the problem.
More work on plot(). Changed the wireframe drawing routine to a loop from the previously hard-coded statements. I added another slice to the wireframe, so ellipses are drawn at +-100%, +-50%, +-25%, and 0% of the height vector, and upgraded the ellipses from 8 to 16 points.
Refined the plot() function, and corrected some errors regarding elliptical cross sections and primitives not centered at the origin.
Started a simple plot() function, based primarily on the superell's plot(). It currently ignores tolerances, but gives an idea of where the hyperboloid is.
Added mged support to create a hyp, still doesn't work completely due to stubbed methods (specifically draw, import5, and export5). Started researching tess() and plot().
Made my first commit today to submit the code I've been working on for the single-sheet hyperboloid. I also realized that I needed to check for divide by zero cases in my algorithms, and I fixed my norm() function to handle the div by zero case.
I'm planning on using this page as a development log for my GSoC work on implementing the revolve and sweep primitive. I have started working on a hyperboloid of one sheet, and posted patches to sourceforge. I have finished the prep, print, shot, norm, uv, and free functions in src/librt/g_hyp.c, and made changes to src/librt/Makefile.am, include/raytrace.h, include/rtgeom.h, and src/librt/table.c to support the new primitive.
- Design document for Revolve Primitive