0% found this document useful (0 votes)
34 views

Computer Graphics: Unit 5

The document discusses parametric design and script files in computer-aided drafting. Parametric design allows objects to be manipulated and regenerated based on parameters and rules, enabling changes to propagate automatically. Repetition and mutation are important concepts, allowing forms to transform gradually. Script files allow sequences of commands to be automated by recording keyboard inputs, reducing the need to retype commands, though they have limitations and other customization methods may be preferable.

Uploaded by

unam123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Computer Graphics: Unit 5

The document discusses parametric design and script files in computer-aided drafting. Parametric design allows objects to be manipulated and regenerated based on parameters and rules, enabling changes to propagate automatically. Repetition and mutation are important concepts, allowing forms to transform gradually. Script files allow sequences of commands to be automated by recording keyboard inputs, reducing the need to retype commands, though they have limitations and other customization methods may be preferable.

Uploaded by

unam123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

UNIT4:

Page |1

Computer graphics
By Manu Gupta

UNIT 5
Interfacing Drafting and Design Analysis: introduction Parametric design Script file Application of a drawing exchange file A design and drafting example Operation in batch mode

ARYA COLLAGE OF ENGINEERING AND INFORMATION TECHNOLOGY


BY MANU GUPTA-09352601453- [email protected]

UNIT4:

Page |2

Parametric design: What is parametric design? There is no precise definition and there are other related terms and synonyms: generative, computational, digital, computer aided, associative. Basically it's far more sophisticated than using computer instead of drawing board. Often when You draw/model your concept, You follow certain operations which are monotone and repetitive, they are algorithms and what's for sure computers are best at algorithms, so why should You do it manually? For example, think of an elevation with windows, each window must have an area equal to 1/8 of room's floor area. It's simple, but when next day You'll decide that 1/7 will do better, and there are 1000 windows? Let the computer handle this algorithm! Another example: You've designed a bench with organic form and wish it'll be made of wood horizontal slices. You need slices' plans and numbers for fabrication and assembly. It is a process used to manipulate, regenerate and design objects based on a set of rules or parameters. Parametric design is now being widely used in the fields of architecture and product design. Repetition: There are many concepts that appear regularly in parametric design projects. One important concept is repetition, which works best when it is used in parallel with rotation, scaling and movement. This simply means to copy an object multiple times while introducing a gradual change in its scale for example. Mutation: Another concept frequently used in parametric design is Mutation. What is meant by mutation is the progressive change in the form of an object along a process based on a few rules. This might completely transform the object to a new form, which makes animation and video logging a great tool to monitor the transformation. Computer visualization programs like Maya and Rhino are used to create 3D forms using a scripting language. Each program has its own language, which is relatively easy to learn. In this site well be using MEL (Maya embedded language) to explore and demonstrate parametric design.

ARYA COLLAGE OF ENGINEERING AND INFORMATION TECHNOLOGY


BY MANU GUPTA-09352601453- [email protected]

UNIT4:

Page |3

How to design with A PARAMETRIC EQUATIONS ? First before to know how to design with A parametric Equation you have to know WHAT IS THE PARAMETRIC EQUATION ? In mathematics, parametric equation is a method of defining a relation using parameters. A simple Kinematical example is when one uses a time parameter to determine the position, velocity, and other information about a body in motion. Abstractly, a Parametric Equation defines a relation as a set of equations. It is therefore somewhat more accurately defined as parametric representation. It is part of regular parametric representation. 2D Example: Parabola For example, the simplest equation for a Parabola, x=y2 can be parameterized by using a free parameter t, and setting x=t y=t2 Circle Although the preceding example is a somewhat trivial case, consider the following parameterization of a circle of radius a: x=a.cos(t) y=a.sin(t) where t is in the range 0 to 2 pi. 3D Example : Helix Parametric equations are convenient for describing curves in higher-dimensional spaces. For example: x=a.cos(t) y=a.sin(t) z=bt describes a three-dimensional curve, the helix , which has a radius of a and rises by 2b units per turn. (Note that the equations are identical in the plane to those for a circle; in fact, a helix is sometimes humorously described as just "a circle whose ends don't have the same z-value". (This is not exactly true, as a circle is by definition a two dimensional curve and a helix is by definition a three dimensional curve.) Parametric Surfaces: A Torus with major radius R and minor radius r may be defined parametrically as x = cos(t)(R + rcos(u)), y = sin(t)(R + rcos(u)), z = rsin(u) Where the two parameters t and u both vary between 0 and 2 As u varies from 0 to 2 the point on the surface moves about a short circle passing through the hole in the torus. As t varies from 0 to 2 the point on the surface moves about a long circle around the hole in the torus.

ARYA COLLAGE OF ENGINEERING AND INFORMATION TECHNOLOGY


BY MANU GUPTA-09352601453- [email protected]

UNIT4:

Page |4

Script In computer programming, a script is a program or sequence of instructions that is interpreted or carried out by another program rather than by the computer processor (as a compiled program is). What is a Script file in autocad? Script programming was introduced to AutoCAD with version 1.4, w-w-a-a-y-y back in 1983. A script does one thing and one thing only: it mimics what I type at the keyboard. Anything I type in AutoCAD that shows up at the 'Command:' prompt can be put into a script file. That includes AutoCAD commands, their option abbreviations, my responses, and -- significantly -- AutoLISP code. The purpose of the script is to reduce keystrokes by placing the keystrokes in a file. Think of it as a predecessor to the toolbar macro. A script file to draw a line and a circle looks like this: line 1,1 2,2 circle 2,2 1,1 Script files have an extension of SCR. Script files are in plain ASCII. For that reason, I don't use a word processor, such as WordPad, Write, or Word. Instead, I use NotePad to write scripts. Sometimes, when I feel like a DOS Power User, I even write scripts at the DOS prompt: C:\> copy con filename.scr ;This is the script file line 1,1 2,2 circle 2,2 1,1

ARYA COLLAGE OF ENGINEERING AND INFORMATION TECHNOLOGY


BY MANU GUPTA-09352601453- [email protected]

UNIT4:

Page |5

When I'm done, I press [F6] or [Ctrl]+Z to finish editing and close the file. The Drawbacks to Scripts A limitation to scripts is that only one script file can be loaded into AutoCAD at a time. However, a script file can call another script file. Or, I can use some other customization facility to load script files with a single mouse click, such as toolboxes, menu macros, and AutoLISP routines. Another limitation is that scripts stall when they encounter invalid command syntax There are two limitations to scripts that are significant in this age of GUIs (graphical user interfaces): I cannot record mouse movements; and I cannot have a script controlling a dialog box.

ARYA COLLAGE OF ENGINEERING AND INFORMATION TECHNOLOGY


BY MANU GUPTA-09352601453- [email protected]

You might also like