:: Douglas Stein
:: Wolfram Research, Inc.
:: 19 February 1993
:: Templates for fractals881
:: The following template defines a C function that iterates z <- Sin[z]
:Begin:
:Function: sinfractalC
:Pattern: sinFractalC[ThisLink, {{ReMin_, ReMax_, ReSteps_}, {ImMin_, ImMax_, ImSteps_}}]
:Arguments: {N[ReMin], N[ReMax], ReSteps, N[ImMin], N[ImMax], ImSteps}
:ArgumentTypes: {LongDouble, LongDouble, LongInteger, LongDouble, LongDouble, LongInteger }
:ReturnType: Manual
:End:
:: The following evaluation "manually" writes out the correct CallPacket
:: for the above function. In general, you will not need to do this unless
:: you need similar control over the calling of external MathLink template
:: based functions.
:: The first argument in CallPacket is "0" because sinFractalC is the
:: first template defined in fractals.tm. Counting begins at zero for
:: C programmers!
:Evaluate: SinFractalWrite[l_LinkObject, {{ReMin_, ReMax_, ReSteps_},
{ImMin_, ImMax_, ImSteps_}}] :=
LinkWrite[l, CallPacket[0, {N[ReMin], N[ReMax], ReSteps, N[ImMin], N[ImMax], ImSteps}]]
:: The following template defines a C function that iterates z <- Cos[z]
:Begin:
:Function: cosfractalC
:Pattern: cosFractalC[ThisLink, {{ReMin_, ReMax_, ReSteps_}, {ImMin_, ImMax_, ImSteps_}}]
:Arguments: {N[ReMin], N[ReMax], ReSteps, N[ImMin], N[ImMax], ImSteps}
:ArgumentTypes: {LongDouble, LongDouble, LongInteger, LongDouble, LongDouble, LongInteger }
:ReturnType: Manual
:End:
:: The following evaluation "manually" writes out the correct CallPacket
:: for the above function. In general, you will not need to do this unless
:: you need similar control over the calling of external MathLink template
:: based functions.
:: The first argument in CallPacket is "1" because sinFractalC is the
:: second template defined in fractals.tm. Counting begins at zero for
:: C programmers!
:Evaluate: CosFractalWrite[l_LinkObject, {{ReMin_, ReMax_, ReSteps_},
{ImMin_, ImMax_, ImSteps_}}] :=
LinkWrite[l, CallPacket[1, {N[ReMin], N[ReMax], ReSteps, N[ImMin], N[ImMax], ImSteps}]]