Skip to content

Instantly share code, notes, and snippets.

@ismaeldamiao
Last active May 21, 2020 02:19
Show Gist options
  • Save ismaeldamiao/890367569c152c890e1fcf59ab92ab0e to your computer and use it in GitHub Desktop.
Save ismaeldamiao/890367569c152c890e1fcf59ab92ab0e to your computer and use it in GitHub Desktop.
PROGRAM plotar
IMPLICIT none
REAL(8) :: x, y, theta = 0.0d0, dt = 0.01d0
INTEGER, PARAMETER :: arquivo = 10
OPEN(arquivo, FILE="pontos.dat")
DO; IF(theta > 2.0d0 * 3.1415d0) EXIT
x = 2.0d0 * cos(2.0d0 * theta) * cos(theta)
y = 2.0d0 * cos(2.0d0 * theta) * sin(theta)
WRITE(arquivo, FMT=*) x, y
theta = theta + dt
END DO
CLOSE(arquivo)
END PROGRAM plotar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment