From a468ae75a835ea2d465e3b140f2b03731e2b2cd8 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Fri, 2 Jun 2023 11:47:24 -0400 Subject: Fixes to Pi behavior -- works on table! except music I think --- virtual-programs/tags-and-calibration.folk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'virtual-programs') diff --git a/virtual-programs/tags-and-calibration.folk b/virtual-programs/tags-and-calibration.folk index 28abc644..2015e961 100644 --- a/virtual-programs/tags-and-calibration.folk +++ b/virtual-programs/tags-and-calibration.folk @@ -71,12 +71,13 @@ proc ::projectorToCamera {projectorPoint} { } # Wish $this is highlighted white -Say when tag /tag/ has center /c/ size /size/ { +When tag /tag/ has center /c/ size /size/ { Claim tag $tag is a tag lassign [::cameraToProjector $c] px py Claim $tag is a rectangle with x [expr $px-20] y [expr $py-10] width [expr $size*2] height [expr $size*2] -} with environment {} +} +# with environment {} When tag /tag/ is a tag { puts "Added tag $tag" @@ -90,7 +91,7 @@ When tag /tag/ is a tag { } -Say when tag /tag/ has corners /corners/ { +When tag /tag/ has corners /corners/ { set tagcorners [lmap p $corners {::cameraToProjector $p}] # foreach tagcorner $tagcorners { Display::text fb {*}$tagcorner 10 "$tag" } Display::fillQuad {*}$tagcorners white @@ -107,8 +108,9 @@ Say when tag /tag/ has corners /corners/ { lappend edges [list [expr {[llength $corners] - 1}] 0] set region [list $corners $edges [::tcl::mathfunc::atan2 {*}$tagright]] Claim $tag has region $region -} with environment { - %matmul ::math::linearalgebra::matmul - %sub ::math::linearalgebra::sub - %add ::math::linearalgebra::add } +# with environment { +# %matmul ::math::linearalgebra::matmul +# %sub ::math::linearalgebra::sub +# %add ::math::linearalgebra::add +# } -- cgit v1.2.3