Skip to content

Instantly share code, notes, and snippets.

View SoTaInverSpinel's full-sized avatar

STInverSpinel SoTaInverSpinel

View GitHub Profile
@SoTaInverSpinel
SoTaInverSpinel / Boids2D.jl
Created November 20, 2018 15:01
Create boids simulation GIF
using Plots
using LinearAlgebra
using Random
Random.seed!(2018)
gr(size=(300,300),titlefont=font("sans-serif",9))
module Boids
struct Param
d::Int64 #dimention
using Plots
gr()
const N=60
const C=convert(Int,N/2)
grid=zeros(N,N)
grid[C,C]=1.0
const motion=[[1,0],[0,1],[-1,0],[0,-1]]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.