TetaTricks/code/awk/mkunion.awk

19 lines
297 B
Awk
Raw Normal View History

2023-02-11 22:19:00 +11:00
#!/usr/bin/awk -f
2024-09-16 12:21:41 +11:00
# create the sdl object: an union of sphere
2023-02-11 22:19:00 +11:00
BEGIN {
print "#declare Bubules = object"
print "{ \nunion { "
}
2024-09-16 12:21:41 +11:00
# active portion of the code
2023-02-11 22:19:00 +11:00
{
printf(" sphere { <%f, %f, %f>, %f }\n", \
$1, $2, $3, $4 )
}
2024-09-16 12:21:41 +11:00
# closing sdl structure
2023-02-11 22:19:00 +11:00
END {
2024-09-16 12:21:41 +11:00
print " }\n}\n"
2023-02-11 22:19:00 +11:00
}