Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
presentations
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
studer_a1
presentations
Commits
74312d76
Commit
74312d76
authored
May 11, 2020
by
studer_a1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial import
parents
Pipeline
#1058
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
MongeKantorvich.odp
MongeKantorvich.odp
+0
-0
bernoulli.odp
bernoulli.odp
+0
-0
bernoulli.py
bernoulli.py
+41
-0
No files found.
MongeKantorvich.odp
0 → 100644
View file @
74312d76
File added
bernoulli.odp
0 → 100644
View file @
74312d76
File added
bernoulli.py
0 → 100644
View file @
74312d76
'''
This python script should demonstrate
that the logarithmic spiral has
(multiple, discrete) scale invariances.
Also visible in animation:
Scale + Rotation = continuous symmetry
Since theta only covers a finite range,
the symmetry is 'broken' (especially
visbible at the end of the animation cycle)
'''
#module load psi-python27/4.4.0
import
numpy
as
np
import
matplotlib.pyplot
as
plt
from
matplotlib.animation
import
FuncAnimation
#Scale paramerts to cover in animtion
beta
=
np
.
linspace
(
0.0
,
2
*
np
.
pi
,
100
)
#angular array
theta
=
np
.
linspace
(
-
6
*
np
.
pi
,
6
*
np
.
pi
,
800
)
#Plot settings
fig
=
plt
.
figure
(
figsize
=
(
6
,
6
))
# Next two lines (values) from https://de.wikipedia.org/wiki/Datei:Logarithmic_Spiral_Pylab.svg
ax
=
plt
.
axes
([
0.1
,
0.1
,
0.8
,
0.8
],
polar
=
True
)
kappa
=
np
.
log
(
1.19
)
#Reference r(theta)
r
=
np
.
exp
(
kappa
*
theta
)
#Plot reference Spiral
ax
.
plot
(
theta
,
r
)
line
,
=
ax
.
plot
([],[])
#Plot scaled spirals
def
update
(
b
):
r_s
=
np
.
exp
(
b
)
*
r
#scales reference spiral
line
.
set_xdata
(
theta
)
#update data in plot (theta unchanged)
line
.
set_ydata
(
r_s
)
# "
return
line
,
#Define and run animation
a
=
FuncAnimation
(
fig
,
update
,
frames
=
beta
,
blit
=
True
)
plt
.
show
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment