// Martin Hebel // SelmaWare Solutions, LLC // July 27, 2023 // 3D Circles // This uses ain0, ain1 and ain3 to control the X, Y and Z (diameter) of a circle. // The range of data for data may be set, as well as how much drawing history to show. // // For more fun, assign a sphere as the canvas background image. // !replaceValuesOff=1 // disables replacing values, properties and math operations !hide // Won't show controls being created // Variables !makeVar varX=51.0425 !makeVar varY=65.83 !makeVar varZ=1.0522 !makeVar xValue=? !makeVar yValue=? !makeVar zValue=? // Main Interface !comments=3D Circles\nThis uses ain0, ain1 and ain3 to control the X, Y and Z (diameter) of a circle.\nThe range of data for data may be set, as well as how much drawing history to show.\n\nFor more fun, assign a sphere as the canvas background image.\n !about=Martin Hebel\nSelmaWare Solutions, LLC\nJuly 27, 2023 !title=3D Circle !backColor=238:238:238 !makeCanvas canv,2.0,2.0,67.0,93.0, !canv.backColor=255:255:255:255 !canv.transparent=0 !canv.maxDrawings=50 !canv.clearCode !canv.code= !makeVar varX; !makeVar varY; !makeVar varZ !canv.code= !varX={:: [ain0] [txtXmin] [txtXmax] 0 100 mapConstrain } !canv.code= !varY={:: [ain1] [txtYmin] [txtYmax] 0 100 mapConstrain } !canv.code= !varZ={:: [ain2] [txtZmin] [txtZmax] 1 10 mapConstrain } !canv.code= !canv.drawFilledCircle [varX],[varY],[varZ],RED !canv.code= !canv.drawCircle [varX],[varY],[varZ],YELLOW !makeLabel lblX,71.0,3.0,21.0,6.0 !lblX.text=X-Axis !lblX.fontBold=1 !makeLabel lblXmin,71.0,16.0,8.0,5.0 !lblXmin.text=X-Min: !makeTextBox txtXmin,80.0,16.0,12.0,5.0, !txtXmin.text=-200 !makeLabel lblXmax,71.0,10.0,8.0,5.0 !lblXmax.text=X-Max: !makeTextBox txtXmax,80.0,10.0,12.0,5.0, !txtXmax.text=200 !makeLabel lblY,71.0,23.0,21.0,6.0 !lblY.text=Y-Axis !lblY.fontBold=1 !makeLabel lblYmax,71.0,30.0,8.0,5.0 !lblYmax.text=Y-Max: !makeTextBox txtYmax,80.0,30.0,12.0,5.0, !txtYmax.text=100 !makeLabel lblYmin,71.0,36.0,8.0,5.0 !lblYmin.text=Y-Min: !makeTextBox txtYmin,80.0,36.0,12.0,5.0, !txtYmin.text=-100 !makeLabel lblZ,71.0,43.0,21.0,6.0 !lblZ.text=Z-Axis !lblZ.fontBold=1 !makeLabel lblZmax,71.0,50.0,8.0,5.0 !lblZmax.text=Z-Max: !makeTextBox txtZmax,80.0,50.0,12.0,5.0, !txtZmax.text=50 !makeTextBox txtZmin,80.0,56.0,12.0,5.0, !txtZmin.text=-50 !makeLabel lblZmin,71.0,56.0,8.0,5.0 !lblZmin.text=Z-Min: !lblZmin.clearCode !lblZmin.code= !makeVar xValue;!makeVar yValue;!makeVar zValue !lblZmin.code= ! !makeSerial serial,69.0,73.0,30.0,23.0, !makeLabel lblHistory,71.0,64.0,13.0,6.0 !lblHistory.text=History: !lblHistory.fontBold=1 !makeTextBox txtHistory,87.0,64.0,5.0,6.0, !txtHistory.text=50 !txtHistory.clearCode !txtHistory.code= !canv.maxDrawings=[[this]] !replaceValuesOff=0 !show !runLoad