Editing User:Mariomeissner/logs

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 2: Line 2:
 
SOCIS 2017 Logs
 
SOCIS 2017 Logs
  
'''10-8'''
+
'''20-6'''
  
Moving task over to rtexample. Including Voronoi tesselation. 0 and 1 points working, including user input (no hardcoded points).
+
Build successfull on Arch Linux (Antergos) x64
 +
Working my way through the Introduction_to_MGED.pdf
  
'''11-8'''
+
'''21-6'''
  
Continued working on n-point Voronoi. Todays code doesn't compile yet.
+
Successfully calculated mass of a copper sphere using rtweight.  
  
'''12-8 & 13-8'''
+
'''11-7'''
  
Break.
+
Diving into the source code of rtweight.
 +
I will need some help understanding the overall structure of the repository and some details about rtweight.
  
'''14-8'''
+
'''12-7'''
  
Continue working on n-point Voronoi.
+
Proposed an initial model of representation. I would use a three-variable function that returns the density of the material at a certain point in space. Integrating this function over the boundaries of the object yields it's mass.
 +
Example can be found here:
 +
https://drive.google.com/file/d/0Bz6hfFobLeoyZC1vQ1JwSU05NDg/view?usp=drivesdk
  
'''15-8'''
+
'''14-7'''
  
Finished initial Voronoi point implementation.  
+
Started working on the example raytrace application. I am setting highest priority to understanding the basic behaviour of this little program, as I know it is the foundation I will need in order to continue with the project.  
  
Will now continue working on implementing vectors.
+
I will try to modify it in some ways and see if I break it.
  
'''16-8'''
+
From today onwards, I will be working from 15:00 to 22:00 most days, and from 10:00 to 13:00 as well a few days a week. After evaluating how much can be done with this schedule, adjustments will be made accodingly.
  
Break.
+
'''15-7'''
  
'''17-8'''
+
Drafted an example of how to obtain a function that returns the density a ray sees at it crosses the object.
  
Working on read_density_points to support vector input.
+
'''16-7'''
  
'''18-8'''
+
Reading through, understanding and compiling the example applications.
  
Finished read_density_points vector update and will now give support to transitions (vectors) with arbitrary 'rate' inside segment_density calculations.
+
'''17-7'''
  
Moved old logs to a separate page (http://brlcad.org/wiki/User:Mariomeissner/logs/old) to keep this one clean.  
+
Modeling the sword and continuing yesterdays work.
  
 +
Starting with the candle example to get practice.
  
'''30-8'''
+
'''18-7'''
  
Left the code in a more stable shape. Fixed some bugs, projections are now skipping.
+
Making new, blade that actually fits the specifications; remaining time digging through the viewweight.c code.
  
'''5-9'''
+
'''19-7'''
  
Finally set myself up in Germany.
+
Designing proper density model that allows for good implementation.
New objective: test out code and fix any more bugs.
 
Took my time to set up dev environment, but couldnt work because of compilation issues.
 
  
'''6-9'''
+
'''20-7'''
  
Testing and fixing code. Found major flaw in projection skipping.
+
Studying source code.
  
'''7-9'''
+
'''25-7'''
  
Worked on a new model to properly skip projections.
+
Setting up eclipse development build and studying source code.
  
'''8-9'''
+
Facing problem where Eclipse does not properly recognize tons of symbols in the code, including basic types like "FILE". One candidate solution is to browse to the C/C++ pre-processor settings and adding and configuring the CDT GCC built-in compiler. Details here: https://stackoverflow.com/questions/21065616/multiple-could-not-be-resolved-problems-using-eclipse-with-mingw
  
Implemented the new projection skipping model and re-ran the tests. Everything seems to work correctly for now.
+
However performing the steps on there crashes the indexer while it's updating.  
  
'''9&10-9'''
+
I'm using Arch, Eclipse Oxygen and the latest available GNU compiler suite. I built the project for eclipse using CMake following the guide over at wiki/compiling.
  
Break
+
Thinking about how the user should input the density data and how we should handle it inside, I found this to be relevant:
 +
https://en.wikipedia.org/wiki/Curve_fitting
  
'''11-9'''
+
We could let the user set any number of points throughout the material with specific densities, and then we can apply a simple curve fitting algorithm to  create a continuous density function. This function could be stored in some struct or array and then be used to return the density value at any given point with precision. These requested points could be used for interpolation by the calling code.
  
Cleaning code and moving over to rtweight. Once I moved I will run rtweight tests to see if mass is correctly computed for simple shapes.
+
'''26-7'''
  
'''12-9'''
+
New goal: modify the example application to shoot a ray to the object and calculate it's density assuming it's a 0 to 1 change.
  
Found some more mistakes in the code.  
+
Working on goal.
  
 +
Results: [https://puu.sh/wTDzC/5c3a15af9a.png screenshot]
  
'''13-9'''
+
'''27-7'''
  
Preparing the move to rtweight.  
+
New goal: snippet code to read density points from command line into data structure.
  
'''14-9'''
+
'''28-7'''
  
Moving code to rtweight. It's harder than expected and things don't work yet.
+
Debugging yesterdays work.  
I tried cleaning out most of the code that was used to read densities from the file, and rely only on my own function call (so that I can avoid the stupid segmentation fault I can't get rid of).  
 
  
'''15-9'''
+
Managed to make it work to a point where I think the goal has been reached. Further expansions of this goal may be made once more is known about the density specification.
  
Break.
+
'''29-7'''
  
'''16-9'''
+
New goal: write simple function that returns the density value for a material at any point in space, for simple specifications (a few density_points at max).
  
Mass returns as NaN so something is wrong somewhere. Debugging.  
+
Working on goal.
  
'''17-9'''
+
Todays work: [https://transfer.sh/PvVCy/rtexample.c]
  
Had several compilation problems. I can now compile on VS again. Density file loads.
+
'''30-7'''
Mass now returns 0.
 
  
'''18-9'''
+
Continuing with yesterdays work. Decided to make a new structure to store vectors and their factors. We can go through the list of provided points for a material specification and compute the vectors we care about, push them to a list.
  
Break.
+
'''31-7'''
  
'''19-9'''
+
Received feedback on yesterdays work. Apparently I tried to do breadth first, which resulted in too ambiguous code that obviously wasnt working yet either.  Today I tried to revert that and made a simpler situation work. Figuring out how to properly use vmath macros and bu_lists, as well as debugging my mistakes, took away most of my time today but I feel it was an enlightening process. Emailed results.
  
Investigating cause of negative densities that end up causing the final mass to be 0.
+
'''1-8'''
  
'''20-9 & 21-9'''
+
Day off
  
Because of course registration and orientation events, busy. Break.
+
'''2-8'''
  
'''21-9'''
+
Partial day off. Woring on blade.
  
Fixing code in rtweight.
+
'''3-8'''
  
 +
Finished blade curve.
  
'''22-9'''
+
Working on density(), will try to make the vector list work.
  
Fixed several issues, mass now computes, but wrongly.  
+
Facing a little design problem. If we have a vector_list, we need to be able to keep track of who's vector each projection is. We cannot store it inside the vector bc we will want to reuse it on other calls. One solution could be creating struct contribution and store both the value and a pointer to the vector it came from. After all we only need the factor. Calculing everything necessary (projection and contribution) within the loop and then throwing away the information has also been considered. It could work if we do average but would not work if we want to perform some other more complex operation on them.
  
Trying to learn to use the VS debugger.
+
'''4-8'''
  
Starting to get a feel on why things don't work. I'm finding and polishing several issues. I also noticed that I am not correctly handling two edge cases for segment density:
+
Continuing yesterdays goal.  
  
-First point should be a skip (for now I had assumed first point would never be one, without really thinking about it).
+
Separating code into my own files, and restoring rtexample to the original.
  
-First bunch of points or last bunch of points' projections lay outside the segment. They should receive special consideration.
+
Figuring out how to set up new projects within the solution in VisualStudio.
  
'''23-9'''
+
'''5-8'''
  
From today I will try to approach the final step of my code in a slightly different way, in order to correctly handle projections outside the segment, but who's boundaries actually lay inside. I will use intersections to compute a list of boundaries, and then just loop through them once to calculate avg density. I will not use the projection point in this stage (I will still use it to predict a skip).
+
Carrying my work over to viewweight.c . New goal is to make case 0 and 1 points work while using my code. Will also model a box that will serve as initial dummy example object. Calculate results by hand and compare with code output.
  
I know I should write complete code, but this overhaul will take some time. I will try to release in-progress working stages if I can. I really think this new version cleans up the mess quite a lot, simplifies the concepts, makes it all more readable, and most importantly, will support more situations than before, removing several flaws.
+
'''6-8'''
 
 
The whole projection concept wasn't that good of an idea to begin with, I shouldn't have stuck to it for so long. It's only useful for predicting skips.
 
 
 
'''24-9 to 1-10'''
 
Holiday (trip).
 
 
 
'''02-10'''
 
 
 
Refactoring stage 1.
 
 
 
'''03-10'''
 
 
 
Desiging new algorithm for stage one.
 
 
 
 
 
'''04-10'''
 
 
 
Designed and published new algorithm and published it.
 
 
 
'''05-10'''
 
 
 
Starting with implementation.
 
 
 
'''06-10'''
 
 
 
Broke down implementation steps. Got rid of intersection function, replaced by a new, more complete function that tells us if a point's region will be crossed or not, directly. Computes the intersection, checks if it lays inside the segment and checks distances to evaluate if the boundary is crossed by the segment or not, returns a boundary_t struct.
 
 
 
'''07-10'''
 
 
 
Implementing new algorithm step 1.
 
 
 
'''08-10'''
 
 
 
Break
 
 
 
'''09-10'''
 
 
 
Finished and submitted new algorithm, tested for 0, 1 and 2 points.
 
 
 
'''10-10'''
 
 
 
Hunting for bugs and removing old/unused variables and code blocks.
 
 
 
'''11-10  && 12-10'''
 
 
 
University.
 
 
 
'''13-10'''
 
 
 
Testing more cases and making sure no more bugs are present.
 
 
 
'''14-10'''
 
 
 
Moving code over to rtweight (again).
 
 
 
'''15-10'''
 
 
 
Finished moving code over, and testing the implementation. Basic cases seem to work. Submitted code.
 
  
 +
Some more tests on current code. Started working on the new 4 point example.
  
  
 
Mario Meisner.
 
Mario Meisner.

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)