# Last edited on 2019-04-17 03:19:19 by stolfilocal ###################################################################### # Creates a frame of an animation file with a specified clock value. # Caller must define ${NAME}, ${TAG}, ${WIDTH}, ${HEIGHT}, ${NRAYS}, ${CLOCK}, ${SHOW}. # The root source file will be ${NAME}.pov. # The output image file will be ${NAME}-${TAG}-${CLOCK}.png. # The ${SHOW} must be "YES" to display the image during and after tracing. # NAME := NAME.IS.UNDEFINED ifneq "${NAME}" "NAME.IS.UNDEFINED" TAG := TAG.IS.UNDEFINED ifneq "${TAG}" "TAG.IS.UNDEFINED" WIDTH := WIDTH.IS.UNDEFINED ifneq "${WIDTH}" "WIDTH.IS.UNDEFINED" HEIGHT := HEIGHT.IS.UNDEFINED ifneq "${HEIGHT}" "HEIGHT.IS.UNDEFINED" NRAYS := NRAYS.IS.UNDEFINED ifneq "${NRAYS}" "NRAYS.IS.UNDEFINED" CLOCK := CLOCK.IS.UNDEFINED ifneq "${CLOCK}" "CLOCK.IS.UNDEFINED" SHOW := SHOW.IS.UNDEFINED ifneq "${SHOW}" "SHOW.IS.UNDEFINED" POVFILE := ${NAME}.pov OTHERINPUTS := ${filter-out ${NAME}-%, ${wildcard *.inc pic-*.png }} # POV-Ray installation directories: POVPUB := /usr POVRAY := ${POVPUB}/bin/povray POVINC := ${POVPUB}/share/povray-3.7/include/ POVTTF := tt-fonts POVTOOLS := ../tools ifeq "/${SHOW}" "/YES" POVSHOW := +D else POVSHOW := -D endif IMVIEW = display -title "%f" .PHONY:: \ frame showframe \ clean FRAMEPREFIX := ${NAME}-${TAG} FRAMENAME := ${FRAMEPREFIX}-${CLOCK} FRAMEPNG := ${FRAMENAME}.png FRAMEBORDER := 0 all: ${FRAMEPNG} ${FRAMEPNG}: ${POVFILE} ${OTHERINPUTS} @echo "OTHERINPUTS = ${OTHERINPUTS}" -/bin/rm -f ${FRAMEPNG} ${POVRAY} +K${CLOCK} \ +FN +Q9 +MB1 \ +W${WIDTH} +H${HEIGHT} \ +AM1 +A0.0 +R${NRAYS} \ ${POVSHOW} \ +L${POVINC} \ +L${POVTTF} \ +I${POVFILE} \ +O${FRAMEPNG} \ 2>&1 | ${POVTOOLS}/reformat-povray-output.gawk && \ if [[ -s ${FRAMEPNG} ]]; then \ { if [[ "/${SHOW}" == "/YES" ]]; then ${IMVIEW} ${FRAMEPNG} ; fi } ; \ else \ exit 1 ; \ fi clean:: -/bin/rm -f ${FRAMEPNG} endif # ${SHOW} endif # ${CLOCK} endif # ${NRAYS} endif # ${HEIGHT} endif # ${WIDTH} endif # ${TAG} endif # ${NAME} # End ######################################################################