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.

Categories

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

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.

+4

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

+4
to setup
  clear-all
  import-pcolors-rgb "dog.jpg"
  ask patches [
    sprout 1 [
      set color pcolor
      set shape "cat"
      set heading 0
    ]
  ]
  ask patches [
    set pcolor black
  ]
  reset-ticks
  import-drawing "teddy.jpg" 
end

to go
  ask turtles [
    right 5
  ]
  tick
end

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

0

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)
+1

agreed. Thank you, Kashav

+5 votes

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

https://ccl.northwestern.edu/netlogo/docs/bitmap.html

answered by (3.5k points)
...