Pb_3D_visuPt
by spgoo
HTML
<script src="https://cdn.jsdelivr.net/npm/[email protected]/distrib/jsxgraphcore.js"></script>
<div id="box1" class="jxgbox" style="margin:0px 0px 0px 2px;width:550px; height:600px;">
</div>
CSS
.styled {
font-family: cursive, sans-serif;
}
JavaScript
var board= JXG.JSXGraph.initBoard("box1", {pan: {enabled:false},boundingbox: [-2.5,6, 10,-1],withLines:true,
keepaspectratio: true, axis:false,
defaultAxes: {
x: { ticks: {visible: false},withLabel: true},
y: { ticks: {visible: false},withLabel: true}
},showNavigation:true,showInfobox: true,showCopyright:false});
board.renderer.container.style.backgroundColor='#C5ADC5';
var box = [0, 10];
var view = board.create('view3d',
[
[-1, -2], [8, 8],
[box, box, box]
],
{
depthOrder: { enabled: true, },
axesPosition: 'center', projection:'parallel',
xPlaneRear: {visible: false, fillColor: 'yellow', mesh3d: {visible: false}},
yPlaneRear: {visible: false,fillColor: '#fff', mesh3d: {visible: false}},
zPlaneRear: {visible: false,fillColor: '#fff', mesh3d: {visible: false}},
yPlaneFront: { visible: false, fillColor: 'blue', mesh3d: {visible: false}},
xPlaneFront: {visible: false,fillColor: '#fff',mesh3d: {visible: false}},
zPlaneFront: {visible: false,fillColor: '#fff',mesh3d: {visible: false}},
});
// creation d'un point et d'un plan de construction
let Pt_def2= view.create('point3d', [2.5,1,1], { name:'',visible:false,size: 8 ,fixed:true,strokeColor:"red",fillColor:"red"});
/*var plane1 = view.create('plane3d', [ Pt_def2,[1, 0, 0], [0, 1, 0],[-Infinity,Infinity], [-Infinity, Infinity]],
{name:'E1', layer:2,fillColor: 'red', strokeWidth: 1, strokeColor: '#888888',strokeOpacity: 0.5, mesh3d: { visible: true }});*/
var plane1 = view.create('plane3d', [ Pt_def2,[1, 0, 0], [0, 1, 0],[-Infinity,Infinity], [-Infinity, Infinity]],
{name:'E1', layer:15,fillColor: 'red', strokeWidth: 1, strokeColor: '#888888',strokeOpacity: 0.8, mesh3d: { visible: true }});
var plane2 = view.create('plane3d', [ Pt_def2,[0, 0, 1], [0, 1, 0],[-Infinity,Infinity], [-Infinity, Infinity]],
{name:'E1', layer:15,fillColor: 'blue', strokeWidth: 1, strokeColor: '#888888',strokeOpacity: 0.8, mesh3d: { visible: true...