🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.graphics.algorithms
6 messages
6 total messages Started by Roy Smith Wed, 22 Nov 1995 20:23
Need help finding graphics-oriented programming projects
#10
Author: Roy Smith
Date: Wed, 22 Nov 1995 20:23
48 lines
3088 bytes
     I'm in a sticky situation and need some advice.  I'm teaching a class
in introductory C programming to a mixed group of people, ranging from a
faculty member here in the Microbiology department, to graduate and
medical students, to one person (a young adult) who is a talented graphic
artist but has a weak background in math and science, and no previous
programming experience.  On the other hand, he's bright, and a wiz at such
Macintosh packages as Photoshop, Swivel-3D, and the like, as well as such
conventional media as pencil and paper rendering.  My artistic
development, on the other hand, reached its zenith when I discovered in
the 3rd grade that if you mix enough colors of paint, you get brown.

     I'm really struggling to find programming assignments I can give
which will be useful and interesting to him.  When I wrote the syllabus
for the course, all my programming assignments were aimed at people who
had strong math and science backgrounds (find prime numbers, solve the
ideal gas law equation, stuff like that), but these are totally lost on
him.  He is eager to learn, but is falling behind in the class because of
this.   I've already had one other person of similar background drop out
of the course because "I'm a visual person, not a programmer", and I'm
determined not to see that happen with a 2nd student.

     I don't have much experience in graphics programming, but all the
examples I can think of in that field seem like they quickly end up
involving math which is beyond this student's capabilities.  So, what I'm
looking for are some topics in computer graphics which will grab this
student's interest, but which are free of higher math, and of a scope
which could reasonably be expected to be handled in the first few weeks of
an intro programming course by a student with no prior programming
experience.

     I've been teaching the course in a Unix environment.  If it helps,
we've got available to us CodeWarrior on the Mac, but I shied away from
teaching in that environment, because I'm not very experienced with it (I
tend to believe it's a good idea for a teacher to know more about the
environment in which he's teaching than his students).

PS, if you want to see some examples of this students artistic work, check
out the following:

http://mchip00.med.nyu.edu/images/new_homepage.gif
http://mchip00.med.nyu.edu/lit-med/medhum_titletr.gif
http://mchip00.med.nyu.edu/~meadj01/path/hiplogo.gif

-- 
Roy Smith <roy@nyu.edu>
Hippocrates Project, Department of Microbiology, Coles 202
NYU School of Medicine, 550 First Avenue, New York, NY 10016
"This never happened to Bart Simpson."
Re: Need help finding graphics-oriented programming projects
#12
Author: Gareth Rees
Date: Thu, 23 Nov 1995 20:24
22 lines
1443 bytes
Roy Smith <roy@popmail.med.nyu.edu> wrote:
> So, what I'm looking for are some topics in computer graphics which
> will grab this student's interest, but which are free of higher math,
> and of a scope which could reasonably be expected to be handled in the
> first few weeks of an intro programming course by a student with no
> prior programming experience.

The LOGO language is designed for precisely this kind of thing.  LOGO is
an interpreted Lisp-like language with "turtle graphics" drawing
primitives along the lines of

   FORWARD n    move forward n units in the current direction
   LTURN a      turn left through angle a
   RTURN a      turn right through angle a
   PEN UP       stop drawing
   PEN DOWN     start drawing

These primitives, plus arithmetic and control structures for iteration
and recursion, are plenty to start drawing complicated figures.

-- 
Gareth Rees
Re: Need help finding graphics-oriented programming projects
#13
Author: Steve Hollasch
Date: Fri, 24 Nov 1995 05:02
22 lines
1618 bytes
roy@popmail.med.nyu.edu (Roy Smith):
< I'm really struggling to find programming assignments I can give
< which will be useful and interesting to him.

    I don't know how much you're planning on teaching, but imaging
operations on graphics files might be one answer.  On the programming side,
he will have to learn pointers (memory alloc & free), multiple indexing
(simple pointer and doubly-indexed arrays), and file I/O.  In addition, he'd
have to learn some file format and be able to read and write a file of that
format (I don't have a particular simple one in mind, though).

    The graphics side is very simple -- just about anything you do to an
image is magic when you're new to it.  For example, read in a simple image
and then write three files:  one red, one green and one blue.  Or write out
the four CMYK files.  Other possibilities include smoothing (just average
neighbors in some way) and sharpening (smoothing with different components
=^).

    Don't know how well this will mesh with his expertise, but I expect that
it might excite him enough to plow into it.

                                         Steve <hollasch@acm.org>
Re: Need help finding graphics-oriented programming projects
#11
Author: Mike Brindley
Date: Sat, 25 Nov 1995 19:07
67 lines
3125 bytes
roy@popmail.med.nyu.edu (Roy Smith):
< I'm really struggling to find programming assignments I can give
< which will be useful and interesting to him.

You might try Barnsley's 'Chaos Game'.  It's generally the first thing
I do when starting with a new graphics system.

Here's the description:

1. Open a drawing area on the screen

2. Pick three widely seperated points on the screen (pixel coordinates,
most likely).  It's nice if these points form an equilateral triangle,
but not necessary.  Call these points the 'attractors'.

3. Pick a starting point in the drawing area.  Make this the 'current
point'.

4. Randomly pick one of the three attractors.  

5. Make the new current point the average of the coordinates of the
old current point and the attractor randomly chosen in step 4.

6. Plot the (new) current point to the drawing area.

7. Repeat steps 4-6 for a set number of times (100,000 may be a good
place to start - this number depends on the speed of your computer and
the resolution of the drawing area.


Magically, a figure will appear on the screen.  It is a fractal called the
Sierpenski gasket.  The three attractors form the corners of the base 
triangle.  This figure is the result of taking a triangle, connecting
the midpoints of each side, and removing the triangle in the middle.  
Recursively repeat until you get tired :).  The first stage looks like
this:

           /\
          /__\
         /\  /\
        /  \/  \
        --------

I hope you can get the idea.

A few notes on the procedure.  You will want to pretty much fill the
screen with the triangle, so choose the attractors along the top and
bottom edges.  If the starting point is chosen as one of the attractors,
you get instant convergence; otherwise, you will want to not plot the
first few (say 10) points.  This works well using all integer math in
pixel coordinates.  The randomly choosing 1 of 3 is probably the only
somewhat tricky point - but it will work quit well with just modulo'ing
the integer returned from standard random number routines to base 3.

One nice (minor) modification of this procedure is to change the 
color of the point plotted, using a different color depending on which
attractor was used to make the current point.  Nice bright red, green,
and blue work pretty well.

This basic algorithm is called an 'Iterated Function System' and leads
into Fractals and Fractal Image Compression.  With a teensy bit more
math, you can do other figures.  One very interesting one is a fern
leaf.

-- 
--> Mike Brindley
    brindley@ece.orst.edu
Re: Need help finding graphics-oriented programming projects
#14
Author: Alex Colburn
Date: Mon, 27 Nov 1995 16:09
52 lines
3363 bytes
roy@popmail.med.nyu.edu (Roy Smith) wrote:

>I'm in a sticky situation and need some advice.  I'm teaching a class
>in introductory C programming to a mixed group of people, ranging from a
>faculty member here in the Microbiology department, to graduate and
>medical students, to one person (a young adult) who is a talented graphic
>artist but has a weak background in math and science, and no previous
>programming experience.  On the other hand, he's bright, and a wiz at such
>Macintosh packages as Photoshop, Swivel-3D, and the like, as well as such
>conventional media as pencil and paper rendering.  My artistic
>development, on the other hand, reached its zenith when I discovered in
>the 3rd grade that if you mix enough colors of paint, you get brown.

>     I'm really struggling to find programming assignments I can give
>which will be useful and interesting to him.  When I wrote the syllabus
>for the course, all my programming assignments were aimed at people who
>had strong math and science backgrounds (find prime numbers, solve the
>ideal gas law equation, stuff like that), but these are totally lost on
>him.  He is eager to learn, but is falling behind in the class because of
>this.   I've already had one other person of similar background drop out
>of the course because "I'm a visual person, not a programmer", and I'm
>determined not to see that happen with a 2nd student.


How about some programming assignments for basic biological principles?
Plotting population growth, or allele selection.  This may be interesting to the
biologists, and only need a high school level of education?


>     I don't have much experience in graphics programming, but all the
>examples I can think of in that field seem like they quickly end up
>involving math which is beyond this student's capabilities.  So, what I'm
>looking for are some topics in computer graphics which will grab this
>student's interest, but which are free of higher math, and of a scope
>which could reasonably be expected to be handled in the first few weeks of
>an intro programming course by a student with no prior programming
>experience.

For an actual graphics or imaging project, i'd try to frame it
around the concepts you are trying to teach.

For your file IO sections, a graphics file manipulation may be a
good project.  I'd use XV to display the images,and create/read a PPM
(or other simple format) images. The for and while loops lessons 
can modify the images, convert to gray scale or blur the images.

Or you could do a simple OpenGL program, the samples in the OpenGL
programming guides are really simple and appropriate for a first
C class.


Alex
Re: Need help finding graphics-oriented programming projects
#15
Author: Dan Lyke
Date: Tue, 28 Nov 1995 00:12
25 lines
1542 bytes
In article <roy-2211951523470001@mchip8.med.nyu.edu>, roy@popmail.med.nyu.edu 
says...
>
>     I'm in a sticky situation and need some advice.  I'm teaching a class
>in introductory C programming to a mixed group of people,
[snip]
>to one person (a young adult) who is a talented graphic
>artist but has a weak background in math and science, and no previous
>programming experience.

Fractals, recursive subdivision (turtle graphics!) or Mandelbrot/Julia sets 
(Yeah, the math is complex, but if you break it down to arithmetic it's 
trivial).

My first ray tracer was done with an average high school algebra education, and 
I'm no math wiz (But I'm persistent, which counts for something, so that may be 
a little more complex than you want to try).

Some image processing can be done brute force (Blurs, rescaling, have him play 
with "brush stroking" algorithms).

Some simple non-linear simulations (bouncing ball) done in 2d, perhaps even in 
3d if you've got a graphics package he can tie it into.

Dan
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads