collada 1.5 formulas: mathml question

In most of the collada 1.5 examples floating on the net, the following construct is commonly used to reference custom formulas:


<mathml:apply>
  <mathml:csymbol encoding="text/xml" definitionURL="#SASA">SASA</mathml:csymbol>
  <mathml:cn>
  <mathml:cn>
  <mathml:cn>
</mathml:apply>

And the formulas library contains that url:


<library_formulas>
  <formula id="SASA" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
    <newparam sid="a">
      <float>0</float>
	</newparam>
	<newparam sid="gamma">
	  <float>0</float>
	</newparam>
	<newparam sid="b">
	  <float>0</float>
	</newparam>
	<target>
	  <float>0</float>
	</target>
        ....
  </formula>
</library_formulas>

So I’m guessing the convention is that the order the tags are declared determine the parameters and order of the function?

Also, in another free example floating on the net (kr-150), the usage differs a little


<math:csymbol encoding="text/xml" definitionURL="" type="function">SASS</math:csymbol>

The formula defined is still <formula id=“SASS”>

Can anyone confirm that all this behavior is standardized.
thank you,

The ordering of newparam is not important. They just declares parameters for the MathML csymbol tokens.

Reference http://www.w3.org/TR/MathML2/chapter4.html#contm.elem

In COLLADA, the <target> element of the formula declares the left-hand side of the function described by the <technique_common> (e.g. MathML) or <technique> element contents.

Hi Mark,

I understand on the definition side the sids are used for the formulas.

What I don’t understand is the usage side:


<mathml:apply>
  <mathml:csymbol encoding="text/xml" definitionURL="#SASA">SASA</mathml:csymbol>
  <mathml:cn>1</mathml:cn>
  <mathml:cn>2</mathml:cn>
  <mathml:cn>3</mathml:cn>
</mathml:apply>

Which somehow means that a=1, gamma = 2, b = 3. It seems that this is abusing notation rather that following some standard. If that’s the case, what is the proper way of assigning parameters when calling functions?

Also, what is the difference between <definitionURL="#XX"> and <type=“function”>XX</>?

thanks,

That bit is MathML and defined by that spec. That’s why I posted a link to it.

http://www.w3.org/TR/MathML2/chapter4.html#contm.apply
http://www.w3.org/TR/MathML2/chapter4.h … tm.csymbol
http://www.w3.org/TR/MathML2/chapter4.h … opwithqual
http://www.w3.org/TR/MathML2/chapter4.html#id.4.3.2.3

i would rather you read and understand that spec yourself first. Afterward, if you still have questions, we can discuss it further.

Also for MathML 2.0, that the COLLADA 1.5 schema imports for use, the type attribute is not allowed on the csymbol, so I think that is invalid.

http://www.w3.org/TR/MathML2/appendixc. … ef.csymbol