27 lines
453 B
Awk
27 lines
453 B
Awk
|
|
#
|
|
# this code is (C) 2022 tTh
|
|
#
|
|
|
|
BEGIN {
|
|
count = 0
|
|
print "// GENERATED FILE, DON'T TOUCH IT !"
|
|
print "#declare Bloubs = object\n{"
|
|
print "union\t{"
|
|
}
|
|
|
|
{
|
|
if ($5 > 6) color = "Turquoise"
|
|
else color = "Sienna"
|
|
|
|
pigment = "pigment { color " color " }"
|
|
printf "\t\tsphere { <%f, %f, %f>, %f %s }\n", \
|
|
$1, $2, $3, $4, pigment
|
|
count++
|
|
}
|
|
|
|
END {
|
|
print "\t} // end of union\n}\n"
|
|
print "#declare Nb_Bloubs = ", count, ";\n"
|
|
}
|