|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
||||||||||||||||||||||||||||||||||||||||||||||||
2023年03月24日(金) 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]#1 [openscad] fresnel lense
/*
This module is the for generating fresnel lens models and molds
*/
$fs = 0.01;
SPHERE_FACETS = 100;
CYLINDER_FACETS = 100;
LENS_R = 25;
LENS_T = 1;
BASE_T = 2;
N_SECTIONS = 5;
module fresnel_lens( lens_radius = LENS_R,
lens_thickness = LENS_T,
num_sections = N_SECTIONS
)
{
for (n = [1:num_sections])
{
t_n = n*lens_thickness;
a_n = sqrt((2*lens_radius - t_n)*t_n);
t_nm1 = (n-1)*lens_thickness;
a_nm1 = sqrt((2*lens_radius - t_nm1)*t_nm1);
intersection()
{
translate([0,0,-(lens_radius - t_n - BASE_T)])
sphere(r=lens_radius, $fn=SPHERE_FACETS);
difference(){
cylinder(h=lens_radius, r=a_n, $fn=CYLINDER_FACETS);
cylinder(h=lens_radius, r=a_nm1, $fn=CYLINDER_FACETS);
}
}
}
}
MOLD_THICKNESS = 3;
module fresnel_lens_mold( lens_radius = LENS_R,
lens_thickness = LENS_T,
num_sections = N_SECTIONS,
mold_thickness = MOLD_THICKNESS
)
{
t_N = num_sections*lens_thickness;
a_N = sqrt((2*lens_radius - t_N)*t_N);
translate([0,0,mold_thickness])
rotate(a=180, v=[1,0,0])
difference(){
translate([0,0,mold_thickness/2])
cube([2.2*a_N,2.2*a_N, mold_thickness], center=true);
translate([0,0,-lens_thickness/2])
#fresnel_lens(lens_radius = lens_radius,
lens_thickness = lens_thickness,
num_sections = num_sections
);
}
}
/******************************************************************************/
//rendering of part
//fresnel_lens();
fresnel_lens_mold();
( Post message... )
2023年03月31日(金) 旧暦 [n年日記] [更新:"2023/03/31 07:30:44"]#1 [STL] toyokura-slope-D2-lower-center-crossx2.scad
// upper version
module slope (L, H, W, D) {
translate([ -W/2, -D * 2 , 0]) cube([ W, D, H]);
translate([ -W/2, D + L, 0]) cube([ W, D, H]);
polyhedron(
points = [
[ -W/2, 0 , 0],
[ W/2, 0 , 0],
[ W/2, L , H],
[ -W/2, L , H],
[ -W/2, L , 0],
[ W/2, L , 0],
],
faces = [
[ 0, 1, 2, 3],
[ 3, 2, 5, 4],
[ 4, 5, 1, 0],
[ 0, 3, 4],
[ 1, 5, 2]
]
);
}
translate([ 200, 0, 0 ])
rotate([0, 180, 0]) // for lower, invert
// Length Height Width Delta
slope (1000, 250, 300, 100); // 1 x 0.3 m/m for default setup
translate([ -200, 1000, 0 ])
rotate([0, 180, 180]) // for lower, invert
// Length Height Width Delta
slope (1000, 250, 300, 100); // 1 x 0.3 m/m for default setup
( Post message... )
|
最近の日記 2024年11月14日 ・DWL66+ 2018 405 nm 2024年02月19日 ・another (large, 0.55 x 1.0 m/m) version for contrast curve 2024年02月15日 ・curved star cone 2024年02月13日 ・paraboloid with base plane 2024年02月09日 ・bit map format for contrast curve | ||