update notes

main
Motiejus Jakštys 2021-05-19 22:57:46 +03:00 committed by Motiejus Jakštys
parent 869d481523
commit f40407f494
3 changed files with 28 additions and 3 deletions

View File

@ -1,7 +1,7 @@
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
%\usepackage[bitstream-charter]{mathdesign}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}

View File

@ -65,3 +65,21 @@ To:
But perhaps it doesn't look quite as natural. I will trust the original
article to do the right thing here and remove the bend altogether.
The Context of a Bend
---------------------
Similar bends:
> For example, if bend 1 has four unit areas and bend 2 has six unit areas, the
> average size is five units, and the normalized areas of bends 1 and 2 are
> 4/5=0.8 and 6/5=1.2, respectively.
My comment: everything until this sentence is clear. However, "unit areas" is
misleading: there is little reason to normalize areas, but leave the distances
intact (if we'd like to normalize areas, it would make sense to square-root
them).
Removing that removes changes the meaning of the sentence that **euclidean
distance** is normalized (the composite of the bend properties), rather than
a single component.

11
wm.sql
View File

@ -272,7 +272,8 @@ create type t_bend_attrs as (
bend geometry,
area real,
cmp real,
adjsize real
adjsize real,
baselinelength real
);
create function bend_attrs(bends geometry[], dbg boolean default false) returns setof t_bend_attrs as $$
declare
@ -292,6 +293,7 @@ begin
polygon = null;
else
select st_makepolygon(st_addpoint(bend, st_startpoint(bend))) into polygon;
select st_distance(st_startpoint(bend), st_endpoint(bend)) into res.baselinelength;
-- Compactness Index (cmp) is defined as "the ratio of the area of the
-- polygon over the circle whose circumference length is the same as the
-- length of the circumference of the polygon". I assume they meant the
@ -311,7 +313,12 @@ begin
insert into debug_wm (name, way, props) values(
'bend_attrs_' || i,
bend,
json_build_object('area', res.area, 'cmp', res.cmp, 'adjsize', res.adjsize)
json_build_object(
'area', res.area,
'cmp', res.cmp,
'adjsize', res.adjsize,
'baselinelength', res.baselinelength
)
);
end if;
return next res;