[Therion] Some metapost symbols defined so they cannot be scaled
I've just noticed that some metapost symbols are coded so that they ignore scaling options xs, s, l, xl. For example point dig is positioned but not rotated or scaled. def p_dig_UIS (expr pos,r,s,al) = U:=(.4u, .5u); T:=identity aligned al shifted pos; thfill ((-.075u,-.5u){down} .. {up}(0.075u, -.5u) -- (0.075u, .15u) -- (0.3u, 0.15u) -- (0.3u, 0.5u) -- (-.3u, .5u) -- (-.3u, .15u) -- (-.075u, .15u) -- cycle) rotated 45; enddef; Point camp is similar. I can understand why it is not ideal to allow these to be rotated, and usually they should be inserted unscaled. However it is possible to have big, small, major, minor camps and digs that one might want to symbolise with size. In my actual use case I have a plan and elevation at differing layout scales exported to the same pdf. I want these symbols to output the same (unscaled) size and for some reason the size differs by the ratio of the layout scales (I had thought that layout scales were meant to ensure text and symbol size were constant irrespective of layout scale, but the text and symbol sizes in fact differ unless I compensate by symbol scaling). I cannot help thinking I am making some illogical brain-fade error in thinking. A similar symbol, danger, is coded to enable scaling. It works, in that I can make them bigger or smaller with for example -scale l, so the solution appears obvious. picture SBE_danger_raw; SBE_danger_raw := image( fill (331,489)..controls (330,489) and (328,489)..(326,488) --(291,422)..controls (291,422) and (291,421)..(291,421) ..controls (291,417) and (294,414)..(297,413) --(365,413)..controls (369,414) and (371,417)..(371,421) ..controls (371,422) and (371,422)..(371,423) --(336,488)..controls (335,489) and (333,489)..(331,489) ..controls (331,489) and (331,489)..(331,489) --cycle withcolor red; fill (336,427)..controls (336,430) and (334,432)..(331,432) ..controls (328,432) and (326,430)..(326,427) ..controls (326,424) and (328,422)..(331,422) ..controls (334,422) and (336,424)..(336,427) --cycle withcolor white; fill (335,464)..controls (336,466) and (332,466)..(331,466) ..controls (330,466) and (327,466)..(327,464) --(330,436)..controls (330,435) and (330,435)..(331,435) ..controls (332,435) and (332,435)..(332,436) --cycle withcolor white; currentpicture := currentpicture shifted (-(llcorner currentpicture)-(urcorner currentpicture - llcorner currentpicture)/2) scaled (u / max((xpart urcorner currentpicture) - (xpart llcorner currentpicture), (ypart urcorner currentpicture) - (ypart llcorner currentpicture))); ); def p_danger_SBE(expr pos, theta, sc, al) = T := identity rotated theta aligned al scaled sc shifted pos; thdraw SBE_danger_raw; enddef; What do people think of changing the point symbol metapost definitions so that they can all be scaled? Bruce ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] How to morph sketches
Hi Torsten, > As I read some of the last mails I came to the question how to morph a > sketch. You don't. > All I found was on page 89 ff in the book which shows some pictures > before and after morphing. Clarification; that appears to be page 94 of this: https://therion.speleo.sk/downloads/thbook.pdf > If I got it right it is possible like that: Those pages of the book do not (at east to my knowledge) show how you do things with Therion. You do not warp the drawings. You start with the original drawings in a .th2 file. Create a "scrap" and set the approximate scale and approximate scale directions (x/y = east distance/north distance) - normally it doesn't matter if you get this wrong, as long as you have more than one station per scrap, but occasionally it makes very odd shapes if you get it badly wrong. Inside that scrap, you put "station" points on the stations shown in your drawings. You then draw the walls using "wall" lines (and other features using other lines). Then when you process the survey with Therion, it takes the line vectors, and warps those as needed to force them to align with the real directions of the survey legs. I *think* those pages of the book are just trying to help you visualise how Therion will internally warp the *vector* drawing to match the legs. It does not actually warp the xvi/image drawings. The book is trying to show you how the morphing approach would need to correct the imperfections of a sketch to make it align with reality. But maybe I am also wrong, and Therion might have some very cool functionality I have never seen. No doubt one of the highly experienced users will confirm either way. Cheers Tarquin ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] How to morph sketches
What is the advantage of digitizing a morphed sketch over just let therion morph the raw digitized sketch? I usually just digitize the raw paper sketch and get good results. > Am 27.06.2021 um 12:43 schrieb Torsten Schnitter via Therion > : > > > Hi > > As I read some of the last mails I came to the question how to morph a > sketch. > I searched the wiki and the Therion book but could not find how to do it. > All I found was on page 89 ff in the book which shows some pictures before > and after morphing. > But no explanation how to do it in detail. > > If I got it right it is possible like that: > Someone have an image, a sketch of a cave area (which is not orientated > correctly at all). > And you have some survey data from that passage (which should be correct). > The sketch is scanned to a png or jpg file. > Now you can morph this image file into a xvi file where the image is morphed > to the correct orientation matching the messured survey data. > The final result is a new xvi file (with correctly morphed) image inside so > you can use this new xvi file (including survey data as a line and the > correctly morphed sketch itself) as a background image to draw the final > scrap. > Or did I get this wrong? > > Can anyone describe in detail how to do this please!? > Apparently I'm too stupid to make it... > I put a sketch and the survey data from a small passage to this email as a > possible example to show how this process does work. > Many thanks in advance. > > regards, > Torsten > > > ___ > Therion mailing list > Therion@speleo.sk > https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion