Granular.jl

Julia package for granular dynamics simulation
git clone git://src.adamsgaard.dk/Granular.jl
Log | Files | Refs | README | LICENSE

commit cb9209a7e78dc01b4d11d7d027b21267ebe740a1
parent ec3623cba0c5bbde68e58e261f5aa165d5dd5418
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Tue, 12 Sep 2017 18:12:43 -0400

do not generate `.avi` by default, revert to default camera options

Diffstat:
Mexamples/logo.jl | 13++++++++++---
Mexamples/logo.pvpython.py | 28++++++++++++++--------------
2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/examples/logo.jl b/examples/logo.jl @@ -3,10 +3,10 @@ import SeaIce const verbose = true -#const text = "SeaIce.jl" -const text = "Quality Street" +const text = "SeaIce.jl" #const forcing = "down" -const forcing = "gyres" +#const forcing = "gyres" +const forcing = "convergent" # Font created with `figlet` and the font 'pebbles'. If figlet is not installed # on your system, use the string below: @@ -112,6 +112,13 @@ elseif forcing == "down" sim.ocean.u[:, :, 1, 1] = (Base.Random.rand(nx+1, ny+1) - .5)*.1 sim.ocean.v[:, :, 1, 1] = -5. +elseif forcing == "convergent" + Base.Random.srand(1) + sim.ocean.u[:, :, 1, 1] = (Base.Random.rand(nx+1, ny+1) - .5)*.1 + for j=1:size(sim.ocean.u, 2) + sim.ocean.v[:, j, 1, 1] = -(j/ny - .5)*5. + end + else error("Forcing not understood") end diff --git a/examples/logo.pvpython.py b/examples/logo.pvpython.py @@ -60,8 +60,8 @@ renderView1.ResetCamera() #changing interaction mode based on data extents renderView1.InteractionMode = '2D' -renderView1.CameraPosition = [30.5, 11.0, 10000.0] -renderView1.CameraFocalPoint = [30.5, 11.0, 0.0] +#renderView1.CameraPosition = [30.5, 11.0, 10000.0] +#renderView1.CameraFocalPoint = [30.5, 11.0, 0.0] # update the view to ensure updated data information renderView1.Update() @@ -159,20 +159,20 @@ renderView1.OrientationAxesVisibility = 0 # current camera placement for renderView1 renderView1.InteractionMode = '2D' -renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] -renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] -renderView1.CameraParallelScale = 20.56227912200389 +#renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] +#renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] +#renderView1.CameraParallelScale = 20.56227912200389 # save animation -SaveAnimation('./logo/logo.avi', renderView1, ImageResolution=[1239, 785], - FrameRate=10, - FrameWindow=[0, 49]) +#SaveAnimation('./logo/logo.avi', renderView1, ImageResolution=[1239, 785], +# FrameRate=10, +# FrameWindow=[0, 49]) # current camera placement for renderView1 renderView1.InteractionMode = '2D' -renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] -renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] -renderView1.CameraParallelScale = 20.56227912200389 +#renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] +#renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] +#renderView1.CameraParallelScale = 20.56227912200389 # save animation SaveAnimation('./logo/logo.png', renderView1, ImageResolution=[1239, 785], @@ -183,9 +183,9 @@ SaveAnimation('./logo/logo.png', renderView1, ImageResolution=[1239, 785], # current camera placement for renderView1 renderView1.InteractionMode = '2D' -renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] -renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] -renderView1.CameraParallelScale = 20.56227912200389 +#renderView1.CameraPosition = [30.75, 10.99999962002039, 125.01319337485243] +#renderView1.CameraFocalPoint = [30.75, 10.99999962002039, 0.0] +#renderView1.CameraParallelScale = 20.56227912200389 #### uncomment the following to render all views # RenderAllViews()