Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+12 votes

So I know the code to make the movie is on the handout:

repeat 60 [
go
raytracing:render-next-movie-frame]

But I am unsure of where to put that in my code to successfully make my movie, because it did not work for me when making the movie for our last assignment.

asked in CSC 150 January201920 by (8 points)

1 Answer

+4 votes

I am not sure. It depends on how long between each frame you want. If you use ticks, you can try this code. Every 10 ticks, it will render new frame.

if (ticks mod 10) = 0 [
  go 
  raytracing:render-next-movie-frame
]

I can help during class if you need.

answered by (1.1k points)
0

Thank you for your answer

+2

I think you want to have the GO happen regardless of whether ticks mod 10 = 0, so the GO should be up above the whole IF code!

go 
if (ticks mod 10) = 0 [
  raytracing:render-next-movie-frame
]
0

You are right. My bad.

...