200 likes | 325 Views
2007 Canine Acupuncture Project Colorado State University December 4, 2007. Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher. Planned Approach. MRI or CT Scan Data. AMIRA Solid Model. rotation. Computer Model.
E N D
2007 Canine Acupuncture ProjectColorado State UniversityDecember 4, 2007 Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher
Planned Approach MRI or CT Scan Data AMIRA Solid Model rotation Computer Model Physical Model UI touches H3DAPI User Haptics Device stylus
Virtual System • Purpose: To simulate a sense of touch feedback that acupuncture provides without physically touching the mannequin • SensAble PHANTOM Omni Haptics Device: • Allows users to touch and manipulate virtual objects • Model is the most cost-effective • Portable design and compact footprint • IEEE-1394a FireWire port interface
0 0 0 0 0 0 0 0 00 0 0 0 1 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 CT Scan Data • File received was in Amira Mesh (*.am) format • Amira Mesh is a list of integers which describes a 3D image • Each integer corresponds to a different flesh material • Example: describes a single black point in a 3x3 Amira Mesh of white points • Amira 3D can translate the Mesh file to a Wavefront (*.obj) file
The Wavefront File • Represents a 3D object describing surface triangles • Surface is made up of vertices and faces • Vertices are 3D point locations and are listed first • Faces are comprised by three vertices (listed by index) • The example below describes a 4-faced pyramid v x1 y1 z1 //vert1 v x2 y2 z2 //vert2 v x3 y3 z3 //vert3 v x4 y4 z4 //vert4 f 1 2 3 f 1 2 4 f 1 3 4 f 2 3 4 x1,y1,z1 x3,y3,z3 x2,y2,z2 x4,y4,z4
Without API C++ Code Link Libraries With API Operating System PHANTOM Omni Device Drivers C++ Code X3D Code Python Code H3D API Link Libraries Operating System PHANTOM Omni Device Drivers API Abstraction
Test Program dog_main.x3d H3D File that contains file linkage information. Main Executable enclosure.x3d Defines H3D Object and Environment (viewpoint, dog, stylus). DogStart.py Provides User Interface Calls Dog.py’s update() function on each scene refresh. Performs Point SetComparison, Grading, & Saving. Dog.py Main class for the haptic interaction. Contains an update() function that is called on each scene refresh. Performs point touch acquisition. Performs object rotation. MySQL Database Contains current rotational value of the Physical Dog Head.
Stand Design • Old Concept • Motor, PIC, RS232 Device • Problems with Previous Design
Stand Design • New Design • Parts Removed: • PIC, RS232, Motor, Gear assembly • Parts Added • MA3, magnetic shaft encoder • DU-158U, Analog/Digital Converter
Stand Design • Coupled the two shafts together • Possible Improvement
Closest Point Algorithm • Divide and conquer method • Two closest points • d is the minimum distance between all pairs of points • Split the points into two equal subsets • Find the minimal distances for each side dl and dr • Compute the minimum distance δ between Sl and Sr • Minimum between δ, dl and dr • Not good for looking at each of the teacher points and each of the student points and comparing them
Straightforward Algorithm • Loop through each of the teacher points for each student point • A hit is a Teacher Point that is closest to the current Student Point • At each hit, we remove this teacher point from the available teacher point list • This way in the end we will know if there are still teacher points that were not hit
Flaw with algorithm: • There could arise a situation in which a teacher point was removed on accident • This case rare because the Student attempts should be 1 to 1 with Teacher Points Grading: • Finally, the code saves the student points as they go through the simulation. • The code prints out : • The Student Point • The Target Teacher Point • The distance between the two for comparison (5 mm) y a b m n x
Voronoi Algorithm • The partitioning of a plane with n points into convex polygons • Each polygon contains exactly one generating point • Every point in a given polygon is closer to its generating point than to any other generating point • A point location data structure can be built on top of the Voronoi diagram in order to answer nearest neighbor queries • With this algorithm we can not only determine which point the student was aiming for by marking if its in the region, we can also know for sure if a region was missed altogether • Tricky to turn the program into 3D by making Voronoi regions into polyhedrons
Budget • Because Python, the H3D API, & MySQL are open source, there was no cost associated with the Test Program. • We did have to purchase some new parts for the Base Unit. • Most of our purchases for this semester were covered by the $50 per student allotment.
Project Continuation • Head/Haptics Device Calibration • Create communication stream from Test Program to Base Unit USB Device • Incorporation of Voronoi Algorithm for Grading • Expansion of current UI