adjust number of teeth drawn

This commit is contained in:
numzero 2026-10-08 23:35:34 +03:00
parent ba38ed036c
commit 160052a23a

View File

@ -55,7 +55,7 @@ fn main() {
let mut t = 0.0;
let n_rack_teeth = 6;
let n_crown_teeth = 3;
let n_crown_teeth = 4;
let n_teeth = 24;
let n_teeth_sample = n_teeth;
@ -131,7 +131,7 @@ fn main() {
let make_crown = |profile| {
let mut crown_project = Vec::new();
for tooth in -n_crown_teeth..=n_crown_teeth {
for tooth in -n_crown_teeth..n_crown_teeth {
for k in 0..n_points_per_tooth {
let tooth_frac = k as f32 / n_points_per_tooth as f32;
let normal_height_at_r =
@ -226,7 +226,7 @@ fn main() {
let mut pts_rack = Vec::new();
let mut pts_cutter = Vec::new();
for tooth in -n_rack_teeth..=n_rack_teeth {
for tooth in -n_rack_teeth..n_rack_teeth {
for k in 0..n_points_per_tooth {
let x = (tooth as f32 + k as f32 / n_points_per_tooth as f32 + rack_offset)
* PI;