Results 1 to 4 of 4

Thread: collada 1.5 formulas: mathml question

  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    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:

    Code :
    <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:

    Code :
    <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 <newparam> 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

    Code :
    <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,
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: collada 1.5 formulas: mathml question

    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.

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Tokyo, Japan
    Posts
    88

    Re: collada 1.5 formulas: mathml question

    Hi Mark,

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

    What I don't understand is the usage side:

    Code :
    <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,
    Rosen Diankov
    Department of Mechano-Informatics, University of Tokyo
    http://openrave.org

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: collada 1.5 formulas: mathml question

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •