ME 5241 Computer Aided Engineering Tom Chase Fall Project #3, Part 2 Animating the Juice Extractor Linkage (due Monday, 11/20/00)

Similar documents
TWO-DIMENSIONAL TRANSFORMATION

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

2 SYSTEM DESCRIPTION TECHNIQUES

The elements used in commercial codes can be classified in two basic categories:

MET 306. Activity 8a. Mechanism Design Creo 2.0 Level 7 POINT A GROUND LINK LINK 1 LINK 2 LINK 3 POINT B 10/15/2010 1

Figure 1.1 Vector A and Vector F

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Physics 221 Experiment 5: Magnetic Fields

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Introduction to Computer Graphics

Computer Graphics Labs

Pro/ENGINEER Wildfire 4.0 Basic Design

Unified Lecture # 4 Vectors

INTRODUCTION TO RENDERING TECHNIQUES

Robot Task-Level Programming Language and Simulation

Sources: On the Web: Slides will be available on:

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

EasyC. Programming Tips

Figure 1 - Delta Theta Input Selection

9.4. The Scalar Product. Introduction. Prerequisites. Learning Style. Learning Outcomes

Chapter 1. Creating Sketches in. the Sketch Mode-I. Evaluation chapter. Logon to for more details. Learning Objectives

Cabri Geometry Application User Guide

Vectors 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

TABLE OF CONTENTS. INTRODUCTION... 5 Advance Concrete... 5 Where to find information?... 6 INSTALLATION... 7 STARTING ADVANCE CONCRETE...

PARAMETRIC MODELING. David Rosen. December By carefully laying-out datums and geometry, then constraining them with dimensions and constraints,

Design of a Universal Robot End-effector for Straight-line Pick-up Motion

Designing and Drawing a Sprocket Visualizing ideas through the creation of CAD solid models is a key engineering skill.

Vector has a magnitude and a direction. Scalar has a magnitude

WESTMORELAND COUNTY PUBLIC SCHOOLS Integrated Instructional Pacing Guide and Checklist Computer Math

RESEARCH PAPERS FACULTY OF MATERIALS SCIENCE AND TECHNOLOGY IN TRNAVA SLOVAK UNIVERSITY OF TECHNOLOGY IN BRATISLAVA

Prentice Hall Mathematics: Course Correlated to: Arizona Academic Standards for Mathematics (Grades 6)

Intermediate Tutorials Modeling - Trees. 3d studio max. 3d studio max. Tree Modeling Matthew D'Onofrio Page 1 of 12

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Chapter. 4 Mechanism Design and Analysis

Intersection of a Line and a Convex. Hull of Points Cloud

SOLID MECHANICS TUTORIAL MECHANISMS KINEMATICS - VELOCITY AND ACCELERATION DIAGRAMS

Institution : Majmaah University. Academic Department : College of Science at AzZulfi. Programme : Computer Science and Information Course :

Creating a 2D Geometry Model

Autodesk Fusion 360: Assemblies. Overview

3. KINEMATICS IN TWO DIMENSIONS; VECTORS.

An introduction to 3D draughting & solid modelling using AutoCAD

CATIA Functional Tolerancing & Annotation TABLE OF CONTENTS

Basic AutoSketch Manual

Tolerance Charts. Dr. Pulak M. Pandey.

Animations in Creo 3.0

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Mechanics lecture 7 Moment of a force, torque, equilibrium of a body

2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION

Teaching Methodology for 3D Animation

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy

Content Author's Reference and Cookbook

Solving Simultaneous Equations and Matrices

Prentice Hall Algebra Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009

STRAND: Number and Operations Algebra Geometry Measurement Data Analysis and Probability STANDARD:

ISAT Mathematics Performance Definitions Grade 4

Input and Interaction

EVERY DAY COUNTS CALENDAR MATH 2005 correlated to

Lecture L6 - Intrinsic Coordinates

Problem of the Month: Cutting a Cube

PLANE TRUSSES. Definitions

ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER

Lecture L5 - Other Coordinate Systems

Rotation: Moment of Inertia and Torque

How To Use Plant Simulation In A Computer Program

Geometry: Unit 1 Vocabulary TERM DEFINITION GEOMETRIC FIGURE. Cannot be defined by using other figures.

Exercise 5.0 LUNAR MOTION, ELONGATION, AND PHASES

Lecture Notes, CEng 477

Chapter 17. Orthogonal Matrices and Symmetries of Space

Masters of Science in Software & Information Systems

Such As Statements, Kindergarten Grade 8

2 Session Two - Complex Numbers and Vectors

ME Week 11 Introduction to Dynamic Simulation

(Refer Slide Time: 2:03)

ICS : 435. Computer Graphics Applications. Instructor : Da'ad Albalawneh

Introduction to CATIA V5

Visualizing Data: Scalable Interactivity

w = COI EYE view direction vector u = w ( 010,, ) cross product with y-axis v = w u up vector

Introduction to Engineering Analysis - ENGR1100 Course Description and Syllabus Monday / Thursday Sections. Fall '15.

GeoGebra. 10 lessons. Gerrit Stols

SpaceClaim Introduction Training Session. A SpaceClaim Support Document

Learning Autodesk. Modeling, Analysis and Animation SDC. Randy H. Shih. Better Textbooks. Lower Prices. PUBLICATIONS

Reflection and Refraction

CPIT-285 Computer Graphics

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

Lecture 3: Coordinate Systems and Transformations

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Creating Sectional Views. This week you will learn creating sectional views. The steps to follow are: Cutting Plane Types of sectional views

Understand the Sketcher workbench of CATIA V5.

Dev eloping a General Postprocessor for Multi-Axis CNC Milling Centers

Illinois State Standards Alignments Grades Three through Eleven

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

Solutions to Practice Problems

Chapter One Introduction to Programming

Essential Mathematics for Computer Graphics fast

Maya 2014 Basic Animation & The Graph Editor

Pro/E Design Animation Tutorial*

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

To draw a line. To create a construction line by specifying two points

Computer Graphics. Computer graphics deals with all aspects of creating images with a computer

Finite Element Method (ENGC 6321) Syllabus. Second Semester

Transcription:

ME 5241 Computer Aided Engineering Tom Chase Fall 2000 Project #3, Part 2 Animating the Juice Extractor Linkage (due Monday, 11/20/00) You will write a program to animate the slider-crank linkage that you designed for your juice extractor in Project #1 1. The program will use the graphics pipeline to draw each link of the juice extractor at each position used in the animation. The animation will be limited to two dimensions for simplicity; i.e., only the plane of motion of the links should be drawn. You may have used the mechanism package of Pro/ENGINEER to animate your linkage in Project #1. In contrast, you will implement the kinematic analysis of the slider-crank yourself in this project. Furthermore, you will implement the details of drawing each link. This approach is taken to prepare you to develop graphics interfaces for other programs in the future. In addition, robotics and advanced kinematics leverage essentially the same background. You are not expected to utilize the Pro/ENGINEER model of each link. You are not expected to emulate the three-dimensionality of any actual link. You may use simplifications of the actual links; for example, you need not represent fasteners or non-essential details. Nevertheless, you are encouraged to make the 2-D representation of each link as realistic as possible; the overall quality of representation of your mechanism will be considered in the grading. This document begins with the derivation of the kinematics of a general slider-crank. The general expectations for implementing the graphics animation are then described. A detailed series of implementation notes are provided next to help you develop a well-structured program to implement the animation. A grading sheet is included as the last page. Students using C will use the OpenGL software to implement the animation. Students using FORTRAN will use SGI s GL software. However, the generic transformation and windowing principles to be used in this project are applicable to a wide range of alternative graphics systems. Kinematics of the Slider-Crank Linkage The equations necessary for analyzing a generalized slider-crank are developed here. Your animation program will need a function to implement these equations. The results are used to determine the rotations and displacements necessary to orient each link of the slider-crank at each position of the animation. The generalized slider-crank is illustrated in Fig. 1. We assume that the link pinned to ground is utilized as the driver. The length of the driving link is r D. The length of the 1 You may change the kinematics and appearance of your linkage if you wish. 1

Y S θ S r C θ C f r DθD A θ S O X Figure 1: Basic parameters defining a slider-crank linkage. coupler link is r C. The angle of the driver, θ D, is assumed to be specified. The angle of the path of the sliding link, θ S, is known. In general, the path of the slider may be offset from the ground pivot of the driver by f. At the start of the analysis, the angle of the coupler link, θ C, and the position of the sliding pivot, S, are unknown. Note that the ground pivot of the driver is assumed to be at the origin of the global coordinate frame in Fig. 1. While this assumption is convenient, it is not necessary. If you prefer not to make this assumption, you will need to add one more translation to your modeling transforms to account for the arbitrary position of the ground pivot. As with a four-bar linkage, a slider-crank can always be assembled in two different positions for one position of the driver. They are differentiated by assigning a configuration when calculating the angle of the coupler link. This is clarified in Fig. 2. The dashed configuration is obtained by adding angle φ 1 to angle θ S + π/2. This is identified as configuration µ = +1. The dotted configuration is obtained by subtracting angle φ 1 to angle θ S + π/2. This is identified as configuration µ = 1. A practical slider-crank may operate in either configuration. You must choose the configuration that you prefer. Note that a practical slider-crank will never change configuration during its motion. The reason is that this would require the coupler to go perpendicular to the slider (angle φ 2 = ±π/2 in Fig. 2). Practically, angle φ 2 should never go out of the range ±30, or the slider will likely bind. Once a configuration is selected, coupler angle θ C is calculated by first determining angle φ 1 (see Fig. 3): ( ) f rd sin (θ D θ S ) φ 1 = arccos Then: r C θ C = θ S + π 2 + µ φ 1 2

Y φ 2 φ 2 φ 1 φ 1 θ C, θ S + π 2 θ C,+ X Figure 2: Two possible configurations of a slider-crank (dashed: µ = +1; dotted: µ = 1). Y f φ 1 r D sin(θ D θ S ) θ C,+ X Figure 3: Detail of the analysis of a slider-crank. 3

y x O A Figure 4: Defining the driving link relative to a convenient local coordinate frame. To complete the analysis, the coordinates of the moving pivot of the driving link are calculated, then the coordinates of the slider pin are calculated: x A = r D cos θ D y A = r D sin θ D x S = x A + r C cos θ C y S = y A + r C sin θ C Expectations for Implementing the Graphics Animation The graphics pipeline greatly simplifies the process of animating links of arbitrary complexity. The geometry of each link is defined with reference to a convenient local coordinate frame. Modeling transformations are then applied to move the link to its actual position in the mechanism. This procedure is clarified below. Excellent structure is obtained by designing one function to draw each link of the mechanism. The links are drawn by calling functions similar to pntmod in Part 1 2. You may want to write additional drawing functions to draw line segments, filled polygons, arcs or circles, and the like. For example, we suggest you write a function to draw a line segment named linmod. Each drawing function (pntmod, linmod and the like) should accept modeling coordinates to define each entity, along with modeling, viewing and device transforms to map the entity to actual pixel coordinates. Do not be concerned with the actual (x, y) position and angle of each link when you are defining its geometry. Rather, reference the geometry of each link to a convenient local coordinate frame. For example, if your driving link took the form of a right-angle bell-crank, you might define its geometry as suggested in Fig. 4. Note that point O is aligned with the local origin and O and A are aligned with the local x-axis. The modeling coordinates for the link are then read directly from the local coordinate frame. When this link is actually drawn, a modeling transform is applied to rotate it by θ D.Similarly, the coupler link and the slider link can be rotated and translated to their kinematically correct positions. The procedure is clarified below: 2 You may wish to use pntmod directly to draw pivot symbols. 4

Position the driving link. Rotate the driver by θ D about O. Position the coupler link. Rotate the coupler by θ C. Translate the coupler by (x A,y A ). Position the slider link. Rotate the slider by θ S. Translate the slider by (x S,y S ). Implementation Notes 1. Important! The functions defining each link of the slider-crank must define them in modeling space! Note that working in modeling space makes defining the geometry the links easier for you. Let graphics transforms do the work of moving the links to their actual positions! If you are attempting to draw the coupler by directly drawing a line between points A and S in world space, you are doing it wrong! 2. This program is complex enough that you need to develop it using structured programming. While we will not collect your structured programming materials, we will examine the structure of your final program. Determine which functions you will need using a top-down design chart. Define the calling arguments of each using an input/output chart. If a function has any logical complexity, simplify it using pseudo-code. 3. Your program will need a loop to draw the slider-crank at every position that you want to show in the animation. Define the viewing and device transforms before starting the loop. Perform the kinematic analysis for a given position of the driver as the first step of this loop. Build the modeling transforms from the results of this analysis. Send the appropriate modeling transform, and the viewing and device transforms, as inputs to the functions that define the geometry of each link. Clearly, a top-down design chart and input-output charts are in order to sort all this out! 4. The linkage will be animated using double buffering. Simple programs demonstrating double buffering are available. An OpenGL sample animation is available from file tchase/opengldblbfdemo.c. A GL sample animation is available from file tchase/gldblbfdemo.f. You are welcome to make use of any fragments of those programs that you wish 3. 5. You are encouraged to use OpenGL or GL commands in addition to those used for Part 1. OpenGL functions are documented in the OpenGL Programming Guide (Second 3 The demonstration programs are also available on the course web site. 5

Edition) and the OpenGL Reference Manual (Second Edition) 4. GL functions are documented in the Graphics Library Programming Guide. These manuals are available for check-out both in Room 308 and the Reserve Room of the Engineering Library in Norris Hall. 6. You should maintain viewing and device transformation matrices separate from the modeling transformation matrices. Your program should interactively prompt the user to type in the window and viewport limits. The viewing transform should be defined using these limits. The device transform should map the virtual space to a 600 X 600 pixel window on the workstation screen. The OpenGL or GL software will automatically clip at the viewport boundaries using the command sequences described in the 11/10/00 lecture, so you need not implement your own clipping algorithm. You may combine the viewing and device transformation matrices, or maintain them as two separate matrices, as you prefer. 7. Your program should interactively prompt the user for how many positions of the linkage should be displayed in the animation. If your linkage has a limited range of motion (i.e., the driver is not intended to be rotated in a full circle), you should distribute those positions over the intended range of motion. 8. I suggest that you begin by drawing a very crude stick figure representation of each link, using nothing but a function like linmod, as described in the previous section. Successfully implementing nothing but a stick figure animation using the graphics pipeline will qualify you for substantial partial credit for the project. 9. However, you are encouraged to develop more elegant representations of each link. You can add the ability to draw arcs, filled polygons, or other graphic entities by designing functions similar to linmod and pntmod for each graphic primitive that you implement. 10. You should include a representation of the ground link. At a minimum, draw a ground pivot at the base of link 1 and a ground symbol next to the slider (see Fig. 1). 11. You must turn in the following as a grading package: (a) The grading sheet, attached as a cover page. (b) A 1/2-page overview describing the functionality of your program. (c) A 1/2-page instruction sheet on how to operate your program. The instruction sheet should tell how the source code is compiled and run. Moreover, the instructions should define any inputs requested from the user when the program is run. (This will be used by the grader to operate your program.) (d) A well-structured, fully-documented program listing. Please do not print more than two pages per 8.5 X 11 sheet on the listing submitted for grading to enable the graders to read it easily. 4 GLUT function documentation is available from web site http://reality.sgi.com/opengl/glut3/glut3.html. 6

(e) An electronic version of the source code of your program. The electronic version should consist of all the (uncompiled) C, C++ or FORTRAN code associated with your final program packaged in one file 5. The file is submitted as follows: i. Choose a file name that begins with your initials and ends with proj3.<ext>. (<ext> may be c, cpp or f.) The initials will be used to identify your file. For example, I would name my file: trc proj3.c ii. Be sure your file is in final form before proceeding with the next step. Due to the nature of our submission procedure, you can only submit one file! iii. Issue the ftp command 6 : % ftp You will then get the ftp> command prompt. Request a connection to the mechanical engineering ftp server: ftp> open ftp.me.umn.edu Specify your Name as me5241. Specify your Password as CAE class. iv. Submit your file to the ftp server using the put command. For example, I would submit my part file using the command: ftp> put trc proj3.c v. Stop ftp by issuing the exit or quit command: ftp> quit Please send your final program to the class ftp site before 8:00 AM on Monday, 11/20/00. You need not turn in any graphics hardcopy, as we will actually run your program to test it. 5 You may prefer to keep different functions in different files on your own account. 6 Characters printed by the system are underlined. 7

ME 5241 - Fall 2000 Name: Project #3 Evaluation Due Monday, November 20, 2000 Category Points Possible Points Earned 1) Part 1 2) Final form of transformation functions 3) Basic graphics animation 4) Representation of link geometry A) Acceptable enhancement B) Exceptional enhancement 50 5 14 3 3 5) Program structure 10 6) Program documentation 10 7) Overview and instruction sheet 5 TOTAL 100 Note: Please this sheet as the cover page of your project. 8