Skip to content

Commit

Permalink
working on a basic random generation and plotting script, but need to…
Browse files Browse the repository at this point in the history
… go to bed now
  • Loading branch information
Kuhron committed Nov 18, 2024
1 parent 0a77485 commit 67e8650
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
contourpy==1.3.1
cycler==0.12.1
fonttools==4.55.0
icosalattice==0.0.3
icosalattice==0.0.4
kiwisolver==1.4.7
matplotlib==3.9.2
numpy==2.1.3
Expand Down
20 changes: 19 additions & 1 deletion scripts/PlotRandomNoise.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
import random
import numpy as np
import matplotlib.pyplot as plt
import icosalattice as ic

from icosalattice.UnitSpherePoint import UnitSpherePoint
import icosalattice.IcosahedronMath as icm



if __name__ == "__main__":
n_points = 100
usps = [UnitSpherePoint.random() for i in range(n_points)]
pcs = []
for p in usps:
spc, l, d = icm.get_peel_coordinates_of_point(p)
pc = icm.get_point_code_from_peel_coordinates(spc, l, d)
pcs.append(pc)
els = [random.uniform(-100, 100) for i in range(n_points)]
d = {pc: el for pc, el in zip(pcs, els)}
print(d)

0 comments on commit 67e8650

Please sign in to comment.