#!/usr/bin/perl
# Copyright by C. Lechner, 2008
# http://www.cl-projects.de/
# Published under the terms of the GPL v2
#
# Dieses Skript liefert eine Liste der Koordinaten der neun
# Pads, die man fuer die Noval-Roehrensockel braucht.
#
# Die Zaehlrichtung der Pins ist entgegen des Uhrzeigersinnes.

use Math::Trig;

for($i = 0; $i < 9; $i++) {
	my $phi = deg2rad(36*$i+36);
	my $x = 15 + 10*cos($phi);
	my $y = 15 + 10*sin($phi);
	
	# pcb wants X and Y coordinates in 1/100000 of an inch
	$x = $x*100000/25.4;
	$y = $y*100000/25.4;
	
	printf("%d: x=%d, y=%d\n", $i, $x, $y);
}
