Skip to content

Instantly share code, notes, and snippets.

@Alanaktion
Created September 16, 2015 22:32
Show Gist options
  • Save Alanaktion/4c23863ff389add26b74 to your computer and use it in GitHub Desktop.
Save Alanaktion/4c23863ff389add26b74 to your computer and use it in GitHub Desktop.
A not-quite-accurate minimal SVG Google logo
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Alanaktion
Copy link
Author

Coordinates for arc endpoints can be calculated with this:

<?php
$theta = - pi() / 4;

$px = 405; $py = 89;
$ox = 380; $oy = 89;

$x2 = cos($theta) * ($px - $ox) - sin($theta) * ($py - $oy) + $ox;
$y2 = sin($theta) * ($px - $ox) + cos($theta) * ($py - $oy) + $oy;

var_dump([$x2, $y2]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment