2016-02-01 66 views

回答

1

如果您接受turtleset而不是標題的列表,然後:

to-report weighted-mean-heading [turts] 
    let mean-x mean [size * sin heading] of turts 
    let mean-y mean [size * cos heading] of turts 
    report atan mean-x mean-y 
end 
+0

,似乎對的,我就來測試一下了一下,雖然第一。 –

+0

謝謝。你剛剛回答了這個問題http://stackoverflow.com/questions/34749916/need-help-on-speeding-up-a-particle-system-or-how-to-ask-turtles-not-to-ask-oth –