Skip to content

Commit

Permalink
update gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Jul 1, 2023
1 parent b88bfae commit 3f2bd79
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
12 changes: 10 additions & 2 deletions docs/gallery/weaving_examples/helicatenoid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pin!(steptree)
# ## Export the shape in SVG format
export_pinned_steps("helicatenoid-a", steptree, unitlength=(40,"mm"), mesh=(18,1))

# ![](helicatenoid-a/pinned/pinned-9.svg)

# ## Define the shape of the surface (periodic direction)
ElasticSurfaceEmbedding.𝒑₍₀₎(u¹,u²) = SVector(cos(u¹)*cosh(u²),sin(u¹)*cosh(u²),u²)
Dy(i,n) = (-π..π,(i-1)*π/(2n)..(i)*π/(2n))
Expand All @@ -48,8 +50,10 @@ steptree = StepTree()
for i in 1:9
initial_state!(steptree, Dy(i,n), n₁=33)
newton_onestep!(steptree, fixingmethod=:fix3points)
newton_onestep!(steptree, )
newton_onestep!(steptree, )
newton_onestep!(steptree)
newton_onestep!(steptree)
newton_onestep!(steptree)
newton_onestep!(steptree)
refinement!(steptree, p₊=(0,1), k₊=(EmptyKnotVector(),KnotVector([(i-1/2)*π/(2n)])))
newton_onestep!(steptree)
newton_onestep!(steptree)
Expand All @@ -58,3 +62,7 @@ end

# ## Export the shapes in SVG format
export_pinned_steps("helicatenoid-b", steptree, unitlength=(40,"mm"), mesh=(36,1))

# ![](helicatenoid-b/pinned/pinned-9.svg) ![](helicatenoid-b/pinned/pinned-18.svg) ![](helicatenoid-b/pinned/pinned-27.svg)
# ![](helicatenoid-b/pinned/pinned-36.svg) ![](helicatenoid-b/pinned/pinned-45.svg) ![](helicatenoid-b/pinned/pinned-54.svg)
# ![](helicatenoid-b/pinned/pinned-63.svg) ![](helicatenoid-b/pinned/pinned-72.svg) ![](helicatenoid-b/pinned/pinned-81.svg)
13 changes: 12 additions & 1 deletion docs/gallery/weaving_examples/hyperbolic_paraboloid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,15 @@ for i in 1:10
end

# ## Export the shape in SVG format
export_pinned_steps("paraboloid", steptree, xlims=(-2,2), ylims=(-2,2), unitlength=(100,"mm"), mesh=(20,1))
export_pinned_steps("hyperbolic_paraboloid", steptree, xlims=(-2,2), ylims=(-2,2), unitlength=(100,"mm"), mesh=(20,1))

# ![](hyperbolic_paraboloid/pinned/pinned-9.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-18.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-27.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-36.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-45.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-54.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-63.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-72.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-81.svg)
# ![](hyperbolic_paraboloid/pinned/pinned-90.svg)
11 changes: 11 additions & 0 deletions docs/gallery/weaving_examples/paraboloid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ end

# ## Export the shape in SVG format
export_pinned_steps("paraboloid", steptree, xlims=(-2,2), ylims=(-2,2), unitlength=(100,"mm"), mesh=(20,1))

# ![](paraboloid/pinned/pinned-9.svg)
# ![](paraboloid/pinned/pinned-18.svg)
# ![](paraboloid/pinned/pinned-27.svg)
# ![](paraboloid/pinned/pinned-36.svg)
# ![](paraboloid/pinned/pinned-45.svg)
# ![](paraboloid/pinned/pinned-54.svg)
# ![](paraboloid/pinned/pinned-63.svg)
# ![](paraboloid/pinned/pinned-72.svg)
# ![](paraboloid/pinned/pinned-81.svg)
# ![](paraboloid/pinned/pinned-90.svg)
3 changes: 2 additions & 1 deletion docs/gallery/weaving_examples/stereographicprojection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ unitlength = (200, "mm")
r = 0.025

# ## Export all embedded shape
mkdir("stereographicprojection")
for i in 1:10
M = svector2point(steptree.steps[6i].manifold, unitlength)
= domain(bsplinespaces(M)[1])
Expand All @@ -74,7 +75,7 @@ for i in 1:10
width = (xlims[2] - xlims[1]) * unitlength[1]
height = (ylims[2] - ylims[1]) * unitlength[1]

filepath = "embedding-$(i).svg"
filepath = joinpath("stereographicprojection", "embedding-$(i).svg")
Drawing(width, height, filepath)
origin()
background("white")
Expand Down

0 comments on commit 3f2bd79

Please sign in to comment.