Sure, got that. But for a small example, here's something I worked on recently. It's a lamp holder for a single white LED, to serve as an illumination source for some LCD DROs on my benchtop mill.
The holder looks like this:
View attachment 492128
And the code looks like this:
// LED lamp base for DRO illumination
FmaxIR = 4.4; //maximum flare inside radius, mm
FmaxOR = 7.4; // maximum flare outside radius
FminIR = 2.6; // minimum flare inside radius
FminOR = 5.6; // minimum flare outside radius
Fheight = 5; // height of flared portion
Bheight = 11; // height of body
Bh2 = 4; // length of base-compatible section
BIR1 = 5.1/2; // inside radius to accommodate LED body
BIR2 = 6.1/2; // inside radius to capture LED base
difference() { // make features for LED
union() {
translate([0,0,Fheight-.1]) cylinder(h= Bheight+.1, r1 = FminOR, r2 = FminOR, center = false, $fn = 40);
difference() { // make the flared portion
cylinder(h = Fheight, r1 = FmaxOR, r2 = FminOR, center = false, $fn = 40);
translate([0,0,-.2]) cylinder(h = Fheight+.1, r1 = FmaxIR, r2 = FminIR, center = false, $fn = 40);
} // end, difference for flare
} // end, union
translate([0,0,12]) cylinder(h=15, r1 = BIR2, r2 = BIR2, center = false, $fn = 40); // Center hole for LED, stopper for LED base
translate([0,0,-.5]) cylinder(h = 20, r1 = BIR1, r2 = BIR1, center = false, $fn = 40); // Center hole for LED, LED body.
} // end, difference for LED stuff
Dimensions are in mm. OpenSCAD doesn't know or care about Imperial or metric, they're just numbers. I render to an stl and then scale in the slicer.
It may look a bit obtuse but the elements are pretty simple. Cylinder objects are a bit complex because they permit you to specify the radius (or diameter) at the base and top, so it's easy to create tapered cylindrical items. As in this case.
The $fn parameter specifies the number of facets used to approximate the cylinder. More = smoother. But using very low values like $fn = 4 is a dead-simple way to create pyramids.
The code creates the flared and straight sections, and the center hole with a step to capture the base of the LED. There is a second piece that will be glued to the bottom, and it has an internal taper to match the nozzle end of an adjustable mist coolant-dispensing device. It was cheap and the center bore readily accommodates the wiring. The bottom end is a 1/2-20 threaded piece so it's easy to install wherever you want.