File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.14...3.22 )
1
+ cmake_minimum_required (VERSION 3.14 )
2
2
3
3
project (DonutFortran LANGUAGES Fortran )
4
4
5
- enable_testing ()
6
-
7
- add_executable (donut donut.f90 )
5
+ add_executable (donut app/main.f90 )
Original file line number Diff line number Diff line change @@ -49,26 +49,26 @@ program donut
49
49
z= 0
50
50
screen= " "
51
51
j= 0
52
+ sinA = sin (a)
53
+ cosA = cos (a)
54
+ cosB = cos (b)
55
+ sinB = sin (b)
52
56
do while (2 * pi > j)
53
57
i= 0
58
+ cosj = cos (j)
59
+ cosj2 = cosj+2
60
+ sinj = sin (j)
54
61
do while (2 * pi > i)
55
62
sini = sin (i)
56
- cosj = cos (j)
57
- sinA = sin (a)
58
- sinj = sin (j)
59
- cosA = cos (a)
60
- cosj2 = cosj+2
63
+ cosi = cos (i)
61
64
mess = 1 / (sini* cosj2* sinA+ sinj* cosA+5 )
62
- cosi= cos (i)
63
- cosB= cos (b)
64
- sinB= sin (b)
65
65
t = sini* cosj2* cosA - sinj* sinA
66
66
x = 40 + 30 * mess* (cosi* cosj2* cosB - t* sinB)
67
67
y = 12 + 15 * mess* (cosi* cosj2* sinB + t* cosB)
68
68
o = min (L, x+ cols* y) ! < C program goes out of bounds
69
69
N = int (8 * ((sinj* sinA - sini* cosj* cosA)* cosB - sini* cosj* sinA - sinj* cosA - cosi * cosj* sinB))
70
70
if (rows> y .and. y> 0 .and. x> 0 .and. cols> x .and. mess> z(o)) then
71
- z(o)= mess
71
+ z(o) = mess
72
72
screen(o) = TAB(max (N,0 ))
73
73
endif
74
74
i = i + 0.02
You can’t perform that action at this time.
0 commit comments