• Skip to main content
  • Skip to primary sidebar

学習記録

曼荼羅の壁画

2018年4月22日 by 河副 太智 Leave a Comment

1.母ピンの本数
2.角度
3.リストの素数

によって曼荼羅模様が変わるプログラム

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%matplotlib inline
 
 
import matplotlib.pyplot as plt
import math
 
n = 35#母ピンの本数
 
kaku = 360 / n #角度
 
 
x = [] #ピンの位皿
y = [] #ピンの位皿
 
 
pnum = [11,81,101, 3, 17 ] # (1)素数のリスト
 
#索数番目のピンに糸をかける
 
plt.figure(figsize=(8, 8))
for p in pnum:
    for i in range(n+1):
        th = math.radians(kaku*i*p)
        x.append(100 * math.cos(th))
        y.append(100 * math.sin(th))
    plt.plot(x,y)#模様を壁画
    x.clear() # をクリア
    y.clear() #
plt. show()

このエントリーをはてなブックマークに追加

Tweet
[`yahoo` not found]
このエントリーを Google ブックマーク に追加
LinkedIn にシェア
LINEで送る


Filed Under: グラフ

Reader Interactions

コメントを残す コメントをキャンセル

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Primary Sidebar

カテゴリー

  • AWS
  • Bootstrap
  • Dash
  • Django
  • flask
  • GIT(sourcetree)
  • Plotly/Dash
  • VPS
  • その他tool
  • ブログ
  • プログラミング
    • Bokeh
    • css
    • HoloViews
    • Jupyter
    • Numpy
    • Pandas
    • PosgreSQL
    • Python 基本
    • python3
      • webアプリ
    • python3解説
    • scikit-learn
    • scipy
    • vps
    • Wordpress
    • グラフ
    • コマンド
    • スクレイピング
    • チートシート
    • データクレンジング
    • ブロックチェーン
    • 作成実績
    • 時系列分析
    • 機械学習
      • 分析手法
      • 教師有り
    • 異常値検知
    • 自然言語処理
  • 一太郎
  • 数学
    • sympy
      • 対数関数(log)
      • 累乗根(n乗根)
    • 暗号学

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in