Using AVSExpress in an Introductory Computer Graphics Course - PowerPoint PPT Presentation

About This Presentation
Title:

Using AVSExpress in an Introductory Computer Graphics Course

Description:

The co-ordinates of any point on the edge of a circle centred at the origin may ... Student has to generate a height for each co-ordinate based on a random number ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 44
Provided by: arlinef
Category:

less

Transcript and Presenter's Notes

Title: Using AVSExpress in an Introductory Computer Graphics Course


1
Using AVS/Express in an Introductory Computer
Graphics Course
2
Course Structure
  • Undergraduate course is a modular scheme
  • Students study 8 modules per year, each one for
    15 weeks, for 3 years
  • Second year Tools for Graphics and Visualisation
  • Third year Methods for Graphics and Visualisation

3
Tools for Graphics and Visualisation
  • Uses 2D images to implement some of the standard
    algorithms in computer graphics-
  • draw a circle
  • rotate, scale, and translate a 2D shape
  • window to viewport transformation
  • calculate co-ordinates of intersection of 2 lines
  • zoom in and out, pan up/down/left/right
  • Bezier Curve drawing to fit 4 points

4
Visualisation component
  • Create 3D shape from either -
  • 2D profile
  • surface co-ordinates
  • Use AVS/Express to visualise the 3D shape
  • Use AVS/Express to animate the 3D shape

5
Draw a Circle
  • The co-ordinates of any point on the edge of a
    circle centred at the origin may be obtained from
    the following equations -
  • X Radiuscosine(?)
  • Y Radiussine(?)
  • where ? is the angle in radians between the X
    axis and a point on the circle (in an
    anti-clockwise direction)

6
Draw a Circle
Y-axis
  • ? degrees?/180
  • X Radiuscosine(?)
  • Y Radiussine(?)

Radius
?
X-axis
7
Create 3D solid from 2D profile
Y
Y
Solid of revolution of bottle shape
Z
Profile
X
X
8
Create 3d solid from 2D profile
  • The students use the circle code to generate
    the X and Z co-ordinates (the Y
    co-ordinates remain constant for each point on
    the profile)
  • They also have to generate an extra set of
    co-ordinates (exactly the same as the first set)
    to make AVS/Express join the last point up to the
    first one.

9
Surface Plot
  • Specify a regular grid for the (x,y,z)
    co-ordinates
  • Student has to generate a height for each
    co-ordinate based on a random number

10
3D Surface
  • Create a new mid-way point
  • Make its height the average of the adjacent points
  • Randomly modify its new height within limits

a
b
c
11
Include the diagonals
  • Also along the diagonals based on the heights of
    the four corners (a, b, c, and d)

a
b
c
d
12
(No Transcript)
13
Field file for a bottle
  • AVS field file
  • bottle
  • ndim 2
  • dim1 21
  • dim2 15
  • nspace 3
  • veclen 1
  • data integer
  • field irregular

14
Field file for bottle (continued)
  • coord 1 filebottle.dat filetypeascii skip0
    offset0 stride4
  • coord 2 filebottle.dat filetypeascii skip0
    offset1 stride4
  • coord 3 filebottle.dat filetypeascii skip0
    offset2 stride4
  • variable 1 filebottle.dat filetypeascii skip0
    offset3 stride4

15
(No Transcript)
16
Bottle
3D axis with text title
17
Crop
Used crop to reduce the number of horizontal
steps drawn
18
Crop
Used crop to reduce the number of vertical points
drawn
19
Downsize
Used downsize to reduce the number of steps drawn
around the circle
20
Downsize
Used downsize to reduce the number of profile
points drawn
21
(No Transcript)
22
Field file for 3D solid example
  • AVS field file
  • ndim 2
  • dim1 9
  • dim2 11
  • nspace 3
  • veclen 1
  • data integer
  • field irregular

23
Field file (continued)
  • coord 1 filexmastree.dat filetype ascii Skip0
    offset0 stride4
  • coord 2 filexmastree.dat filetype ascii Skip0
    offset1 stride4
  • coord 3 filexmastree.dat filetype ascii Skip0
    offset2 stride4
  • variable 1 filexmastree.dat filetypeascii
    Skip0 offset3 stride4

24
(No Transcript)
25
Neither downsize nor crop used on the first image
26
Downsize
Used downsize to reduce the number of steps in
each circle
27
Downsize
Used downsize to reduce the number of profile
points
28
Crop
Used crop to reduce the number of horizontal
steps drawn
29
  • Here is a selection of some
  • other shapes created
  • by the students

30
Brolly
31
Rings
32
Speaker
33
Cross section of a speaker
34
Two stroke cylinder
35
Animation using AVS/Express
  • Once an image has been created, the students can
    animate the image using the keyframe method of
    animation
  • This creates a series of views (keyframes)
  • AVS/Express can save images from a view
  • Then add frames between the keyframes to produce
    the animated sequence

36
Key-frame animation
  • Need two images which depict the start and end
    frames
  • Create an animation sequence by adding frames
    between the two images
  • The two images must have a reasonable level of
    coherence

37
AVS/Express
  • AVS/Express interpolates images between a series
    of captured visualisations
  • Student captures the keyframes
  • Assigns each keyframe to a time step
  • AVS/Express automatically adds the required
    number of frames between these keyframes to
    produce an animated sequence

38
Keyframes and interpolated frames
keyframes the user defines
interpolated frames added by AVS/Express
39
AVS animation features
  • Simple to add/delete/move keyframes
  • If not a regular time interval between keyframes,
    then specify the time of next frame before adding
    it
  • Can create a cyclic animation
  • Playback control offers forwards, backwards, and
    bounce

40
(No Transcript)
41
Keyframe Controls
42
Module Panel
Modules pull-down menu
Playback the animation
43
Finally . . .
  • This is how we teach visualisation in a level 2
    module -

Use AVS/Express to animate the image
Use AVS/Express to visualise the data
Create 2D profile
Create 3D data
  • What could we do in the level 3 module?
Write a Comment
User Comments (0)
About PowerShow.com