Skip to content

Instantly share code, notes, and snippets.

View rtrvrtg's full-sized avatar
🥫
can check

Geoffrey Roberts rtrvrtg

🥫
can check
View GitHub Profile
@rtrvrtg
rtrvrtg / circle.php
Last active December 18, 2015 15:19 — forked from anonymous/circle.php
<div style="position: absolute;">
<?php
function circle($radius = 10, $center = array(0, 0), $points = 20) {
$point_array = array();
for ($i = 0; $i < $points; $i++) {
$theta = 2 * pi() * ($i / $points);
$x = $radius * sin($theta) + $center[0];
$y = $radius * cos($theta) + $center[1];
array_push($point_array, array($x, $y));