Editing User:Crdueck/log

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 136: Line 136:
 
==05/07/2012:==
 
==05/07/2012:==
 
removed some unessecary functions from libged/analyze.c. factored a section of rt_bot_tess() into a new rt_bot_centroid function and added it to the rt_functab interface. added new rt_part_volume() and rt_part_surf_area() functions for the particle primitive, updated the rt_functab interface to include them and wrote a new analyze_part function.
 
removed some unessecary functions from libged/analyze.c. factored a section of rt_bot_tess() into a new rt_bot_centroid function and added it to the rt_functab interface. added new rt_part_volume() and rt_part_surf_area() functions for the particle primitive, updated the rt_functab interface to include them and wrote a new analyze_part function.
 
==08/07/2012:==
 
familiarized myself with relevant topics for creating non-polygonal tesselation of a sketch, such as delaunay triangulation, approximation of bezier curves, and the source code for the sketch primitive. Lots of good ideas have been suggested on the mailing list regarding how to tesselate a sketch in order to calculate its area for an analyze_sketch function, but also provide the option to export sketches as polygonal representations and other uses.
 
 
==13/07/2012:==
 
added sketch_tess.cpp to primitives/sketch. this file currently contains functions to approximate a bezier curve by a set of circular arcs using the algorithm detailed here: http://itc.ktu.lt/itc354/Riskus354.pdf
 
 
progress was slow at first, as I'm lacking experience working with C++ or the openNURBS library, but quickly improved as I became more comfortable working with the API which provided many useful functions.
 
 
==17/07/2012:==
 
the last few days have been spent working on the contents of sketch_tess.cpp. I've written rt_sketch_surf_area() which is working well for sketchs containing only line_segs and carc_segs. The Bezier approximation still needs some work however.
 
 
I discovered that the approx_bezier() function which is responsible for converting a bezier segment into a std::vector<ON_Carc> approximation had an error, and was producing 249 carc_segs (the algorithm I was using as a guideline produced 6-9 given the same tolerance). After fixing the error the number of carc_segs produced for the segment dropped to a reasonable 12.
 
 
I was able to decrease this further by using the point of maximum deviation from the approximation biarc as the splitting point instead of the first point of deviation greater than tolerance.
 
 
I found another relevant paper here: http://home.zcu.cz/~byrtus/Articles/G1ArcSplineApproximationOfQuadraticBezierCurves.pdf which, among other things, has provided a simple formula to check if a bezier curve segment has monotone curvature over its domain. I can use this to avoid calculating inflection points, which is a good thing because implementing a robust algorithm to determine the inflection point of a bezier curve has proven difficult.
 
 
==18/07/2012:==
 
the current functions to determine the inflection point of a bezier curve, and to find the point of maximum deviation from an approximating curve at which to subdivide the bezier curve use an iterative method which involves walking the curve at fixed intervals (originally 10 steps per curve). This worked, but wasnt very robust.
 
 
a solution for the inflection point function was to use the value of the curvature to determine the step size. Inflection points occur at 0 curvature, therefore as one approaches a point of inflection, the curvature value -> 0. Using the curvature value as the stepping size (with hardcoded maximum/minimum stepping size to avoid weirdness when the curvature is very large or very small) allows for a very precise method to find the point of inflection.
 
 
hopefully a similar approach can be used for finding the point of maximum deviation.
 
 
==19/07/2012:==
 
the fixed step size problem in approx_bezier was solved similarly, with the value of 1 - |crv| used instead of |crv| to determine the step size so the step size is small when the curvature value is large (more likely to deviate from the approximating arc).
 
 
also, added an explanation for the maximum and minimum step values as well as rewriting them as macros and fixed some calculation errors in rt_sketch_surf_area().
 
 
==26/07/2012:==
 
did some code reduction in libged/analyze.c. Pulled common code from analyze_bot_face(), analyze_arbn_face(), and analyze_arb8_face() into a new analyze_poly_face() function.
 
 
updated analyze_arb8(), analyze_arbn(), and analyze_bot() to populate a poly_face struct with the required info (vertices, face normal, and label) and calling analyze_poly_face() to do the analyzing.
 
 
==31/07/2012:==
 
added a new analyze_ars() function to libged/analyze.c. The function uses a method similar to the one used by rt_ars_tess() to find triangular faces on the ars, then populates a poly_face and passes it to analyze_poly_face().
 
 
==03/08/2012:==
 
updated the table interface in libged/analyze.c to allow for tables with arbitrary number of rows. Some primitives like arbn can have an arbitrary number of faces and so the table needs to be dynamically generated to display all the various face information.
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)