When using chatGPT the script I inport into the ghpython node exports goo values instead of points. How to remedy this?
Import necessary modules
import rhinoscriptsyntax as rs
import math
Set the number of points in the grid
numPoints = 10
Set the amplitude and frequency of the sine wave
amp = 10
freq = 1
Set the starting and ending points for the grid
startPoint = (0,0,0)
endPoint = (100,100,0)
Calculate the spacing between each point in the grid
pointSpacing = (endPoint[0]-startPoint[0])/numPoints
Create an empty list to store the points
points =
Create a loop to generate the points in the grid
for i in range(numPoints):
# Calculate the x and y coordinates of the point using the sine wave equation
x = startPoint[0] + i*pointSpacing
y = startPoint[1] + amp * math.sin(freq * x)
# Add the point to the list
points.append((x,y,0))
Draw the points in Rhino
for point in points:
rs.AddPoint(point)