IInk SDK Web REST Math recognition examples

Writing a formula

Considering this request body.

The strokes in the strokeGroups of this request correpond to that writing:

If you ask for application/x-latex output, you will obtain the following result :

\int ^{b}_{a}f'\left( x\right) dx=f\left( b\right) -f\left( a\right).

You can then use this output to insert the formula in your documents:

If your need is to analyze the components of the formula, you can also ask for application/vnd.myscript.jiix or application/mathml+xml.

Solving an equation

Considering this request body.

The strokes in the strokeGroups of this request correpond to that writing:

If you ask for application/x-latex output, you will obtain the following result :

\pi \times 25^{2}=.

Which is Latex for:

When you ask for application/vnd.myscript.jiix, you can see that a node solving the equation is flagged as generated:

{
 "type": "Math",
 "expressions": [ {
   "type": "≃",
   "id": "math/108",
   "value": 1963.4954,
   "items": [ {
     "type": "glyph",
     "timestamp": "2018-12-04 07:49:14.939696",
     "label": "≃",
     "bounding-box": {
      "x": 69.656494,
      "y": 54.63583,
      "width": 8.1594315,
      "height": 5.4090652
     },
     "id": "0000170001000700ff00"
    } ],
   "bounding-box": {
    "x": 68.656494,
    "y": 53.63583,
    "width": 10.159431,
    "height": 7.4090652
   },
   "operands": [ {
     "type": "×",
     "id": "math/73",
     "value": 1963.4954,
     "items": [ {
       "type": "glyph",
       "timestamp": "1970-01-01 00:00:52.903000",
       "label": "×",
       "bounding-box": {
        "x": 37.101265,
        "y": 53.466923,
        "width": 7.6781197,
        "height": 7.6781197
       },
       "id": "00000b0001000700ff00"
      } ],
     "bounding-box": {
      "x": 36.101265,
      "y": 52.466923,
      "width": 9.6781197,
      "height": 9.6781197
     },
     "operands": [ {
       "type": "number",
       "id": "math/78",
       "label": "π",
       "value": 3.1415927,
       "items": [ {
         "type": "glyph",
         "timestamp": "1970-01-01 00:00:50.708000",
         "label": "π",
         "bounding-box": {
          "x": 26.193748,
          "y": 54.876488,
          "width": 7.162426,
          "height": 6.1768761
         },
         "id": "00000a0001000700ff00"
        } ],
       "bounding-box": {
        "x": 25.193748,
        "y": 53.876488,
        "width": 9.162426,
        "height": 8.1768761
       }
      }, {
       "type": "power",
       "id": "math/81",
       "value": 625,
       "bounding-box": {
        "x": 47.524475,
        "y": 46.521534,
        "width": 19.386932,
        "height": 15.474529
       },
       "operands": [ {
         "type": "number",
         "id": "math/79",
         "label": "25",
         "value": 25,
         "items": [ {
           "type": "glyph",
           "timestamp": "1970-01-01 00:00:53.931000",
           "label": "2",
           "bounding-box": {
            "x": 48.524475,
            "y": 51.438522,
            "width": 6.1654167,
            "height": 9.3627243
           },
           "id": "00000c0001000700ff00"
          }, {
           "type": "glyph",
           "timestamp": "1970-01-01 00:00:54.688000",
           "label": "5",
           "bounding-box": {
            "x": 55.626163,
            "y": 51.266624,
            "width": 5.6497192,
            "height": 9.7294388
           },
           "id": "00000d0001000700ff00"
          } ],
         "bounding-box": {
          "x": 47.524475,
          "y": 50.266624,
          "width": 14.751408,
          "height": 11.729439
         }
        }, {
         "type": "number",
         "id": "math/80",
         "label": "2",
         "value": 2,
         "items": [ {
           "type": "glyph",
           "timestamp": "1970-01-01 00:00:55.783000",
           "label": "2",
           "bounding-box": {
            "x": 62.212154,
            "y": 47.521534,
            "width": 3.6992531,
            "height": 5.6176338
           },
           "id": "00000e0001000700ff00"
          } ],
         "bounding-box": {
          "x": 61.212154,
          "y": 46.521534,
          "width": 5.6992531,
          "height": 7.6176338
         }
        } ]
      } ]
    }, {
     "type": "number",
     "id": "math/109",
     "label": "1963.495",
     "value": 1963.495,
     "generated": true,
     "available-notations": [ "decimal", "rational", "mixed" ],
     "items": [ {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.938207",
       "label": "1",
       "bounding-box": {
        "x": 81.561012,
        "y": 51.438522,
        "width": 3.919281,
        "height": 9.3627243
       },
       "id": "00000f0001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.938391",
       "label": "9",
       "bounding-box": {
        "x": 86.416565,
        "y": 51.438522,
        "width": 5.9476776,
        "height": 9.672142
       },
       "id": "0000100001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.938559",
       "label": "6",
       "bounding-box": {
        "x": 93.300514,
        "y": 51.323925,
        "width": 6.0164413,
        "height": 9.6721382
       },
       "id": "0000110001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.938716",
       "label": "3",
       "bounding-box": {
        "x": 100.25323,
        "y": 51.438522,
        "width": 5.3976059,
        "height": 9.5575409
       },
       "id": "0000120001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.938867",
       "label": ".",
       "bounding-box": {
        "x": 106.5871,
        "y": 59.4146,
        "width": 1.5356216,
        "height": 1.5356255
       },
       "id": "0000130001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.939019",
       "label": "4",
       "bounding-box": {
        "x": 109.059,
        "y": 51.438522,
        "width": 6.3831558,
        "height": 9.3627243
       },
       "id": "0000140001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.939169",
       "label": "9",
       "bounding-box": {
        "x": 116.37843,
        "y": 51.438522,
        "width": 5.9476776,
        "height": 9.672142
       },
       "id": "0000150001000700ff00"
      }, {
       "type": "glyph",
       "timestamp": "2018-12-04 07:49:14.939319",
       "label": "5",
       "bounding-box": {
        "x": 123.26237,
        "y": 51.266624,
        "width": 5.6497192,
        "height": 9.7294388
       },
       "id": "0000160001000700ff00"
      } ],
     "bounding-box": {
      "x": 80.561012,
      "y": 50.266624,
      "width": 49.351082,
      "height": 11.84404
     }
    } ]
  } ],
 "available-notations": [ "decimal" ],
 "bounding-box": {
  "x": 25.193748,
  "y": 46.521534,
  "width": 104.71835,
  "height": 15.623508
 },
 "id": "MainBlock",
 "version": "2"
}

If you ask for conversion when you send your strokes, the equation’s solving appears in all the outputs.

\pi \times 25^{2}\simeq 1963.495

We use cookies to ensure that we give you the best experience on our website Read the privacy policy