reset password
Author Message
darkserith
Posts: 45
Posted 10:51 Oct 23, 2015 |

getting this error:

place-image: expects an image as first argument, given (ball 'red 0 2)

how do i make my ball struct an "image"?

an image according to racket, is one of those predefined shapes like a circle, ellipse, triangle, ect or a image you get off of the internet. 

or am i suppose to use a different method like "place-struct" instead of "place-image" in order to place "structures" instead of "images"?

confused

 

thanks

darkserith
Posts: 45
Posted 12:03 Oct 23, 2015 |

nevermind. just going to try passing in FALLING-OBJECT as it is the image, and use the ball structure to mainly keep track of the y-positions, which will ultimately set the placement of the image. there's no way to place a structure onto a scene which makes sense (well i guess you could pass in a structure that has an IMAGE as one of its properties)

my problem was that i assumed what we were actually placing on the scene was the ball structures themselves and manipulating those structures directly. However,  think we are supposed to manipulate the image indirectly through the use of structures.

rabbott
Posts: 1649
Posted 19:21 Oct 23, 2015 |

To convert a ball to an image decide what you want the ball to look like and then create that image. The simplest thing is to draw a circle.