Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the axis in Graphics3Dobject created from ListPlot3D #559

Open
axkr opened this issue Jul 22, 2022 · 0 comments
Open

Print the axis in Graphics3Dobject created from ListPlot3D #559

axkr opened this issue Jul 22, 2022 · 0 comments

Comments

@axkr
Copy link
Owner

axkr commented Jul 22, 2022

Print the axis in Graphics3Dobject created from ListPlot3D.

Determine the axes settings from the 3D plot

and handover to mathics-threejs-backend

Experiments from JSFiddle:

drawGraphics3d(document.getElementById('graphics3d'),
{
axes: { hasaxes: true, ticks: [
                [ // x ticks
                    [0, 0.5, 1], // big ticks
                    [0.05, 0.1, 0.15, 0.25, 0.3, 0.35, 0.45, 0.55, 0.65, 0.7, 0.75, 0.85, 0.9, 0.95], // small ticks
                    ['0', '5', '10'] // big ticks labels
                ],
                [ // y ticks
                    [0, 0.5, 1], // big ticks
                    [0.05, 0.1, 0.15, 0.25, 0.3, 0.35, 0.45, 0.55, 0.65, 0.7, 0.75, 0.85, 0.9, 0.95], // small ticks
                    ['0', '5', '10'] // big ticks labels
                ],
                [ // z ticks
                    [0, 0.5, 1], // big ticks
                    [0.05, 0.1, 0.15, 0.25, 0.3, 0.35, 0.45, 0.55, 0.65, 0.7, 0.75, 0.85, 0.9, 0.95], // small ticks
                    ['0', '5', '10'] // big ticks labels
                ],
            ],
            ticks_style: [[1, 0, 0], [0, 1, 0], [0, 0, 1]]},
elements: [{type: 'polygon',color: [0.0, 0.0, 0.0],opacity: 1.0,coords: [[[0.0,1.0,0.0]],[[0.0,0.0,0.0]],[[0.0,0.0,0.0]]]}],
lighting: [
{type: 'ambient',color: [0.4,0.2,0.2]},
{type: 'directional',color: [0.0,0.18,0.5],coords: [[2,0,2]]},
{type: 'directional',color: [0.18,0.5,0.18],coords: [[2,2,3]]},
{type: 'directional',color: [0.5,0.18,0.0],coords: [[0,2,2]]},
{type: 'directional',color: [0.0,0.0,0.18],coords: [[0,0,2]]}
],
viewpoint: [1.3, -2.4, 2.0]}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant