PHP code example of mathematicator-core / vizualizator

1. Go to this page and download the library: Download mathematicator-core/vizualizator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mathematicator-core / vizualizator example snippets


$renderer = new Renderer;
$request = $renderer->createRequest();

$request->addLine(10, 10, 35, 70);
$request->addLine(35, 70, 70, 35);

// Render specific format:

echo $request->render(Renderer::FORMAT_PNG);
echo $request->render(Renderer::FORMAT_JPG);
echo $request->render(Renderer::FORMAT_SVG);

// Or use default renderer and __toString() method

echp $request;

echo (new Renderer)->createRequest(200, 100)
    ->addLine(10, 10, 35, 70, '#aaa')
    ->addLine(35, 70, 70, 35, 'red');