Fundamentals of Computer Science 1 (CS151 2003S)
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[EC]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Lab Writeups]
[Outlines]
[Project]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Scheme Reference]
[Scheme Report]
[CS151 2003S Gum]
[CS151 2002F]
[CS151 History]
[SamR]
Back to Script-Fu Basics. On to Algorithmic Art.
Held: Wednesday, 2 April 2003
Summary: Today we consider how to write procedures for Script-Fu.
Related Pages:
Notes:
Overview:
;;; Procedure: ;;; circle ;;; Parameters: ;;; image, the id of an image ;;; layer, the id of a layer on that image ;;; x, an integer ;;; y, an integer ;;; r, an integer ;;; Purpose: ;;; Draws a circle centered at (x,y) with radius r using the ;;; current foreground color and brush. ;;; Produces: ;;; Nothing, or so I hope. ;;; Preconditions: ;;; image and layer define an existing image and layer ;;; x, y, and r are all non-negative ;;; Postconditions: ;;; The specified layer now contains a circle with the specified ;;; dimensions. (define circle (lambda (image layer x y r) (gimp-ellipse-select image (- x r) (- y r) (+ r r) (+ r r) REPLACE 0 0 0) (gimp-edit-stroke layer) (gimp-selection-none image)))
randomcolor at a
randomplace with a
randomwidth using a
randombrush.
(create-image width
height)
, which creates a new image of the specified
width and height.
radius(distance from center to point).
Thursday, 16 January 2003 [Samuel A. Rebelsky]
Tuesday, 1 April 2003 [Samuel A. Rebelsky]
Wednesday, 2 April 2003 [Samuel A. Rebelsky]
circle
.
Back to Script-Fu Basics. On to Algorithmic Art.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[EC]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Lab Writeups]
[Outlines]
[Project]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Scheme Reference]
[Scheme Report]
[CS151 2003S Gum]
[CS151 2002F]
[CS151 History]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Tue May 6 09:30:07 2003.
The source to the document was last modified on Wed Apr 2 09:06:31 2003.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2003S/Outlines/outline.35.html
.
You may wish to
validate this document's HTML
;
;
Check with Bobby