ben cordova brendan dahl eric hall jeff bartlett professor peter young dr. narda robinson dr. regina...

20
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

Post on 19-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

2007 Canine Acupuncture ProjectColorado State University

December 4, 2007

Ben CordovaBrendan Dahl

Eric HallJeff Bartlett

Professor Peter YoungDr. Narda Robinson

Dr. Regina Schoenfeld-Tacher

Page 2: 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

User

Physical ModelComputer Model

Haptics Device

touchesUI

rotation

H3DAPI

stylus

Page 3: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

Page 4: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

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

0 0 00 0 00 0 0

0 0 00 0 00 0 0

0 0 00 1 00 0 0

Page 5: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

pyramidv x1 y1 z1 //vert1v x2 y2 z2 //vert2v x3 y3 z3 //vert3v x4 y4 z4 //vert4f 1 2 3f 1 2 4f 1 3 4f 2 3 4

x1,y1,z1

x2,y2,z2

x3,y3,z3

x4,y4,z4

Page 6: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

API Abstraction

Operating System

PHANTOM Omni Device

Drivers

Without API

Link Libraries

C++ Code

Operating System

PHANTOM Omni Device

Drivers

C++ Code

With API

H3D API

X3D Code

Python Code

Link Libraries

Page 7: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Test Program

DogStart.pyProvides User InterfaceCalls Dog.py’s update() function on each scene refresh.Performs Point Set Comparison, Grading, & Saving.

dog_main.x3dH3D File that contains file linkage information.Main Executable

enclosure.x3dDefines H3D Object and Environment (viewpoint, dog, stylus).

Dog.pyMain class for the haptic interaction.Contains an update() function that is called on each scene refresh.Performs point touch acquisition.Performs object rotation.

MySQL DatabaseContains current rotational value of the Physical Dog Head.

Page 8: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Stand Design

• Old Concept• Motor, PIC, RS232 Device• Problems with Previous Design

Page 9: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Stand Design

New Design Parts Removed:

PIC, RS232, Motor, Gear assembly

Parts Added MA3, magnetic

shaft encoder DU-158U,

Analog/Digital Converter

Page 10: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Stand Design

• Coupled the two shafts together

• Possible Improvement

Page 11: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

Page 12: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

Page 13: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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)

a

b

m

n

x

y

Page 14: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

Page 15: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Voronoi Example

Page 16: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Voronoi Example

Page 17: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

Voronoi Example

Page 18: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

BudgetInitial Budget $25,000.00

FA2006 - SP2007 -$9,177.74

FA2007: -$47.76

Python Programming Book -$32.00

Magnetic Encoder -$42.03

1st A/D Converter -$114.73

Base Unit Hardware -$9.00

2nd A/D Converter -$50.00

Senior Design Student Allotment

+$200.00

Total $15,774.50

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.

Page 19: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

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

Page 20: Ben Cordova Brendan Dahl Eric Hall Jeff Bartlett Professor Peter Young Dr. Narda Robinson Dr. Regina Schoenfeld-Tacher

QUESTIONS?