3451-S2008: Project 4 (revised) Ray = line through eye and mark (picked surface point) Cylinder = all points of distanceradius to ray Stabbed vertex =

Slides:



Advertisements
Similar presentations
A complete citation, notecard, and outlining tool
Advertisements

Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
ABC’s of PowerPoint (Office 2007) Part 1: Basic Vocabulary Part 2: Cursors Part 3: Insert Your Text Part 4: Insert Your Pictures Part 5: Basic Tools &
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
Key Applications Module Lesson 12 — Word Essentials
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Word processing Suitable for: Beginner Improver Advanced.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
CIS—100 Chapter 15—Windows Vista 1. Parts of a Window 2.
1.Introduction 2.How to use this module 3.Learning outcomes 4.Text 5.The Master slide 6.Hyperlinks 7.Slide Management 8.Multiple Choice Questions 9.Exploring.
Creating a Document with a Title Page, Lists, Tables, and a Watermark
U3A Computing Class Leader – Brian Moore Week 5 of 10 weeks. Mondays 4:15 to 5:45 pm Next week is half term then an Inset day So Next lesson is 4 November.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Design Studies 20 ‘Show Off’ Project How to make a computer monitor In Google Sketchup By: Liam Jack.
A skills approach © 2012 The McGraw-Hill Companies, Inc. All rights reserved. powerpoint 2010 Chapter 4 Managing and Delivering Presentations.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Solid Modeling SolidWorks Layout ENGR 1182 SolidWorks 01.
Welcome to the Basic Microsoft Word Guide. Before you start this Guide, you will need to complete “Basic Computer”; “Basic Windows” and know how to type.
Chapter 8 Using Document Collaboration, Integration, and Charting Tools Microsoft Word 2013.
TIPS FOR TESTING SUCCESS
Training Demo: FedEx Vendor Clients
Training Demo: DuPont Vendor Clients December 2016
Lesson 7: Preparing the Slide Show
Create a Halloween Computer Game in Scratch
MOM! Phineas and Ferb are … Aims:
CLASS OVERVIEW/OBJECTIVES
Scratch for Interactivity
3451-S2008: Project 4 Solid = finite 3D region bounded by the mesh
Çizge Algoritmaları.
Co-ordinates And Geometry Module 6: Investigation 2
Solid Modeling SolidWorks Layout
Introduction to Windows—Operating System
SketchUp Toy Tank Level of Difficulty Time Approximately 25–30 minutes
Training Demo: Mary Kay Vendor Clients
3.01 Apply Controls Associated With Visual Studio Form
Program and Graphical User Interface Design
Training Demo: FedEx Vendor Clients December 2016
PowerPoint: Tables and Charts
Problems With Assistance Module 2 – Problem 5
Cse 373 May 15th – Iterators.
Autodesk Inventor 2008 Tutorial One Machine Part Alva Academy
Tuesday, January Mr. Fuggi – Intro to Tech. Ed.
How to Use Members Area of The Ninety-Nines Website
GIS - NetmapWEB Training Slides
Using Office 365 in the Classroom
Program and Graphical User Interface Design
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
UNITY TEAM PROJECT TOPICS: [1]. Unity Collaborate
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
ITEC 1001 Test 5 Review.
European Computer Driving Licence
Additive and Subtractive Solid Modeling
Key Applications Module Lesson 12 — Word Essentials
Benchmark Series Microsoft Word 2016 Level 2
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
3D Modelling with Tinkercad
Go to =>
Introduction to PowerPoint
Add a dues payment to the Dues manager module for the Grand Lodge of Nebraska LSI Lodge Secretary Interface online Membership Database.
Data Structures & Algorithms
Key Applications Module Lesson 12 — Word Essentials
Creating a Simple Game in Scratch
Agenda for Unit 5: Control Structures
Welcome To Microsoft Word 2016
Presentation transcript:

3451-S2008: Project 4 (revised) Ray = line through eye and mark (picked surface point) Cylinder = all points of distanceradius to ray Stabbed vertex = vertex inside the cylinder Stabbed triangle = triangle intersecting the cylinder (or for simplicity, intersected by ray or having at least one vertex in cylinder) Cap = edge-connected component of stabbed triangles. Loop = cycle of border edges around a hole in the mesh

Simplified version of P4 ‘x’ will identify the stabbed and make them temporarily invisible. When ‘i’ is kept pressed and the mouse clicked and dragged horizontally, the radius of the cylinder will change and the holes will update, so that the user can control the size of the hole. The user may use ‘y’ to toggle the visibility of the triangles and ‘u’ to make all triangles visible. This way we can inspect the caps by themselves or together with the rest of the mesh. And we can also close the holes (press ‘u’ and make holes elsewhere). ‘H’ (already implemented) deletes all invisible triangles and compacts the corner table. ‘k’ will assume that there are exactly 2 loops and will construct a triangle strip that stitches them.

Step 1: Keyboard commands Add action keys in the ‘keys’ tab: void keys() { …. if (key=='u') {M.unhide();}; if (key=='y') {M.toggleVisibility();}; if (key=='x') {C.setMark(); M.hideCaps();}; if (key=='k') {M.stitchBorders(); }; and create dummy placeholder methods in the class Mesh in the meshClass tab for the method names in blue The variables pt eye and pt mark, which is where you clicked on the mesh are set when you call C.setMark(); already provided

Step 2: Direct manipulation of radius In the Mesh class (‘meshClass’ tab) add float r2 = 1000; // square radius of cylinder In the ‘void updateView()’ procedure ( ‘keys’ tab) add if (key=='i') { M.r2+=(mouseX-pmouseX)*abs(mouseX-pmouseX); M.hideCaps(); }; This will update the r2 variable and re-compute the caps as the user keeps ‘i’ and mouse pressed and moves the mouse horizontally You may want to debug it by printing the value of M.r2 each time it is changed. Make sure to remove the print statement once it works, otherwise things will be very slow.

Step 3: Visualization ‘e’ ‘y’ ‘u’ Write the toggleVisibility and toggleVisibility methods for the Mesh class. the table visible[nt] contains the visibility status for each triangle nt is the number of triangles Here’s unhide: void unhide() { for(int i=0; i<nt; i++) visible[i]=true; } type it in and also make toggleVisibility Test them on the mesh by using ‘e’ to hide some triangles and then reveal them with ‘y’ or unhide all with ‘u’ ‘e’ ‘y’ ‘u’

Step 4a: Geometry Write the hideCaps method that identifies the stabbed triangles and makes them invisible: void hideCaps() { unhide(); classifyVertices(eye,mark); hideStabbedTriangles(); hideHitTriangles(); }

Step 4b: classifyVertices(eye,mark); Use Mv[v] to indicate whether a vertex is in the cylinder. In the Mesh class, add: void classifyVertices(pt A, pt B) { for(int v=0; v<nv; v++) Mv[v]=0; for (int c=0; c<nc; c++) if(ptInCylinder(g(c),A,B,r2)) Mv[v(c)]=1;} and provide the function below at the bottom of the the GEO3D tab. You need to provide the code for computing d2: boolean ptInCylinder(pt P, pt A, pt B,float r2) { vec AP=V(A,P); vec AB=V(A,B); float d2 = … // distance between P and the line through A and B return d2<r2;} Debug this function and the classifyVertices

Step 4c: hideStabbedTriangles(); In the Mesh class, provide code that will hide the stabbed triangles void hideStabbedTriangles() {for(int t=0; t<nt; t++) if (triCutCylinder(t)) visible[t]=false;} First, provide a naïve method that will return true if any vertex of triangle t is stabbed (i.e. when Mv[v]==1 for any vertex of t): boolean triCutCylinder(int t) {return … ;} Later, for extra credit, try to provide a better approach that identifies the stabbed triangles even if they have all their vertices outside of the cylinder.

Step 4d: hideHitTriangles(); Here you want to identify which triangles are hit by the ray. For example, when the radius of the cylinder is very small, the hideStabbedTriangles(); method would miss these. in the class Mesh, add: void hideHitTriangles() { for (int t=0; t<nt; t++) if (rayHitTri(eye,mark,A,B,C)) visible[t]=false; } You must replace A,B,C in the code above by expressions that return the points where the vertices of triangle t are located. Debug this by temporarily commenting out the hideStabbedTriangles(); call in void hideCaps() {…

Step 5a: Stitching Invent a simple and effective solution to the stitching problem where there are only 2 loops and implement it in the Mesh method: void stitchBorders() { clean(); // removes hidden triangles and cleans corner table … } No triangle should intersect the ray The resulting mesh should be free from self-intersections Try to minimize the surface area of the stitching triangle strip You do not need to follow the approach suggested below

Step 5b: Find a corner on each loop Write code that will find the first corner c1 that has no opposite. Mark as visited all corners along the corresponding loop. Find a second unmarked corner c2 that has no opposite. Show a line segment between them.

Step 5c: Make bridge Write code that will add 2 triangles that form a bridge (quad) connecting the border edge of c1 to a vertex of the border edge of c2.

Step 5d: Find best bridge Compute the area of the two triangles. Try all combinations of corners c1 long loop 1 and c2 along loop 2 and use the one for which the bridge has minimal area.

Step 5e: Avoid the ray In the above approach, only use bridges that do not hit the ray.

Step 5f: Zip steps Advance c1 along loop 1 and c2 (in the opposite direction) along loop 2. Implement a zipRight step that adds a triangle between the border edge of c1 and the first vertex of c2. This triangle should have one of its edges shared with the previous bridge. The step should advance c1 to the corner facing the next border edge along loop 1. Implement the zipLeft step that does the same thing but for the border edge of loop 2. Hence it advances c2.

Step 5g: Zipping Make a loop that zips until no more border edges exist. It should advance either c1 or c2, selecting the move that will add the triangle with the smallest area and checking that the candidate triangle is not intersected by the ray. Make sure that the O table is set properly and that the triangles you have created are properly oriented. You may use clean() to identify in red the border edges (there should be none). You may try to use computeO() at the end, or to compute the opposite corners yourself as you make progress in the stitching.

Step 5h: Best next zip Pick zipLeft or zipRight selecting the one that creates a triangle more parallel to the ray.

Step 5i: Snap to cylinder Snap border vertices to the cylinder

Deliverables Teams of 2 or solo (your choice, no benefit for solo) One web page per project (email URL to Justin) Proper title, authors (names, pictures, emails, links) Running applet with 3D mesh viewer and clear explanation on how to use your code. Link to source code with clear explanation of where to find the code you wrote (which should be commented). The whole project is only about 50 LoC!!! PDF file with clear and complete explanation (geometric formulae and pieces of code) showing how you: Identify the vertices in the cylinder Identify and make invisible the triangles with at least one vertex in the cylinder Find the c1 and c2 corners on the loops Construct the bridge Compute the triangle area Extra credit suggestions: Correct computation of the stabbed triangle Updating the O table as you add triangles to the zip Optimization of the zipped strip (for example through edge-flips) Handling cases with 4 loops and with general comments on the applications and limitations of this tool.

Timeline and grading Steps 1 through 4 should be done and debugged by March 7 before class. They are worth 50% of the grade. By march 7, before class, please email to Justin the URL of the project page with the team members… and the code implementing these steps (no documentation needed at this point). If you are not done with some of these steps, please let him know which ones and what is holding you. Steps 5 is due on March 24 before class along with the documentation of the whole project (as discussed above). It is worth 50% of the grade. You do not need to follow the proposed approach. If you implement your own version, please make sure that it is clearly explained Extra credit. Up to a total of 50% of the grade. List the extra credit clearly on your project page It is not limited to the items suggested above Extra credit will be allocated on a competitive basis: The team with the best extra credit package will get up to 50% (TA discretion) and weaker packages will get proportionally less. In class presentations (optional) can bring up to 20% extra credit.

Examples