Advertisement
jukaukor

Circularhelix.jl

Nov 13th, 2023
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. using Plots, LinearAlgebra
  2. # Juhani Kaukoranta 13.11.2023
  3. function circularhelix(a,b,kierroksia,n)
  4.  
  5. # a=kierroksen säde, b=nousu, n=pisteiden määrä
  6. t = LinRange(0,kierroksia*2*π,n)
  7. x = a*cos.(t)
  8. y = a*sin.(t)
  9. z = b.*t
  10. points = [x,y,z] ;
  11. plt3d= Plots.plot(points[1,:],points[2,:], points[3,:],
  12. seriestype=:scatter, markersize = 1,legend=false)
  13. display(plt3d) # plottaa jakauman
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement