Short intro to Pasteltalk
Download the Pasteltalk program for Windows here
or start the machine in a browser (allow your browser to install adobe shockwave if you dont have that plug-in already)
Ill. The Pasteltalk interface
With Pasteltalk you can achieve an understanding of these concepts by experimenting:
List of basic instructions of Pasteltalk
Coordinate system, lines and angles
The coordinate system is defined un-mathematical like in Flash, Director and webbrowsere e.g. X-axis direction is to the right and Y-axis direction is DOWN.
The unit for the coordinates is a pixel.
Angles are declared in degrees and positive numbers turns clockwise.
Lines can be drawn in different widths but may show holes and edges when the stroke is larger than 1.
Colours and surfaces
Colours are defined by three values between 0 and 255 representing Red, Green og Blue respectively.
Rectangle takes 4 parameters being the x and y coordinat for one corner and x and y coordinates for the opposite corner.
Oval takes parameters as well, defining the rectangle that encloses the oval. (Remember a circle is just a square oval.)
Built in functions
absolute value, abs(2)=2, abs(-2)=2, abs(1.35)=1.35, abs(-1.35)=1.35
arctangent, atan(1)=0.7854 (please note here angles are given in radians)
a=date() , a will get the string value of today e.g.: "03-01-2005"
e in the power of x (e being the natural logarithm base number)
rounds x to nearest integer, integer(3.75)=4
the natural logarithm of x, log(4.3)=1.4586
(pi is not a function but rather a constant) PI=3.1416
puts a in the power of x, power(4,3)=64 = 4*4*4
returns a random integer between 1 and x, random(5)=3 (or maybe 2? 1? 4? or 5?)
the sine of x, sin(1.57)=1.0000 (note: angles in radians)
square root of x, sqrt(100)=10
tangent of x, tan(2.0)= -2.1850 (note: angles in radians)
the computer clock, a=time() , a gets the string value of the system clock e.g.: "09:45 "
The functions date() and time() who returns strings are not very usefull in this context but we can see the values in the variable window if we assign the function to a variable.
.. after 6 clicks on DO-IT
Ovals can be circles
Artwork by Jan Skovgård