Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+10 votes
asked in CSC 150 January201920 by (1 point)

Yes, what Kashav said, my assignment has two images. If you do not understand how to do it. Let me know and I can share with you my code.


I did not know what import statement you are using. So, can you share your code with me please?

to setup
  import-pcolors-rgb "dog.jpg"
  ask patches [
    sprout 1 [
      set color pcolor
      set shape "cat"
      set heading 0
  ask patches [
    set pcolor black
  import-drawing "teddy.jpg" 

to go
  ask turtles [
    right 5

-- this is what I had and you can have two or more pictures


Very useful, thank you !

2 Answers

+6 votes

You just have to use two import statements and sprout turtles only where you want to draw a particular image.

It's basically importing and sprouting for the first one and then do the same for the second.

answered by (1 point)

agreed. Thank you, Kashav

+5 votes

Note: it's also possible to do this using the bitmap extension.


answered by (508 points)