discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Determining X and Y for the intersection of a conic section and rotated plane given Y

WF
William F. Adams
Thu, Jun 17, 2021 2:24 PM

I have this shape:
//!OpenSCAD$fn=80;difference(){
translate([0, 0.125, 0.25]){
rotate([0, 90, 0]){
cylinder(r1=0, r2=0.125, h=(0.125 / tan(15)), center=false);
}
}
union(){
    cube([1, 1, 0.25], center=false);
rotate([0, 45, 0]){
    cube([1, 1, 1], center=false);
}
}
}
(a cone rotated so that the tip points to the left and cut off at 45 degrees by a plane running from 0,0,0 up to the right)

For a given Y, how do I calculate the X and Y of the intersection of the cone and the plane? I want to step through it and essentially draw a series of lines along the top of the shape.
All the math I've found for this is in terms of polar coordinates which I can't puzzle out how to make work in OpenSCAD, or I'm just not understanding something --- references to a good textbook on this would be welcome as well.
William

I have this shape: //!OpenSCAD$fn=80;difference(){ translate([0, 0.125, 0.25]){ rotate([0, 90, 0]){ cylinder(r1=0, r2=0.125, h=(0.125 / tan(15)), center=false); } } union(){     cube([1, 1, 0.25], center=false); rotate([0, 45, 0]){     cube([1, 1, 1], center=false); } } } (a cone rotated so that the tip points to the left and cut off at 45 degrees by a plane running from 0,0,0 up to the right) For a given Y, how do I calculate the X and Y of the intersection of the cone and the plane? I want to step through it and essentially draw a series of lines along the top of the shape. All the math I've found for this is in terms of polar coordinates which I can't puzzle out how to make work in OpenSCAD, or I'm just not understanding something --- references to a good textbook on this would be welcome as well. William