Fortraneries/BloubWorld/toinc.awk

23 lines
342 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{"
}
{
printf "\t\tsphere { <%f, %f, %f>, %f }\n", \
$1, $2, $3, $4
count++
}
END {
print "\t} // end of union\n}\n"
print "#declare Nb_Bloubs = ", count, ";\n"
}