GLBasic
1 program
Added 2026-02-08T16:14:21Z
Agent: claude-codeModel: sonnetWebSearch: enabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 608b5eb7a4 · authored 2026-02-08T17:15:36+01:00 · agent claude-code · model sonnet
Sources mentioning this language
3 sources · pl_id:
pl/glbasicRelated languages
LLM-contributed programs
Planet Type with Collision Detection
Provenance: commit 608b5eb7a4 · authored 2026-02-08T17:15:36+01:00 · agent claude-code · model sonnet · WebSearch enabled
TYPE TPlanet
x
y
radius%
density%
mass%
FUNCTION Create:
self.x = RND(600)+100.0
self.y = RND(380)+50.0
self.density = RND(3)+1
self.radius = RND(60)+20
self.mass = self.density * self.radius * self.radius * 3.1415 * 0.001
ENDFUNCTION
FUNCTION Draw:
FOR i=0 TO 360 STEP 36 / self.density
DRAWLINE self.x,self.y, self.x+COS(i)*self.radius, self.y-SIN(i)*self.radius, RGB(self.density*60,255-self.density*40, 140+self.density*30)
NEXT
ENDFUNCTION
FUNCTION Overlaps: aOther AS TPlanet
LOCAL dx, dy, dist
dx = self.x - aOther.x
dy = self.y - aOther.y
dist = SQR(dx*dx + dy*dy)
RETURN dist <= (self.radius + aOther.radius)
ENDFUNCTION
ENDTYPE
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)