Author Topic: C19 Tutorial- Winnatts, discussion board  (Read 3503 times)

Online alastairgott

  • forum hero
  • *****
  • Posts: 1983
Re: C19 Tutorial- Winnatts, discussion board
« Reply #25 on: March 05, 2021, 07:08:02 pm »
1) as my post yesterday, the underlying data which the drawing uses is the survex model, which the drawings are essentially draped over. if the drawing you give it is slightly different to the data, then you will see a transformation (or a warp) in the final result. In these cases it's critical you join the lines to the wall. I have included a picture of a part of a cave, which has a slight transformation in it, which illustates the difference between attaching to points and not attaching to wall points.
 Notice the gap which creeps inbetween the arrow and the wall when you don't attach the arrow to the wall.


This case is rather extreme, but a good illustation of why using the points on the wall is important.


However in some cases the reverse is also true, it doesn't really matter. See below sump drawing, where the area for the sump has just been ringed around the passage, there is a shared "line border" between the area of the sump and the area of the airbell. Looking back, I think I could split the rock at the start of the sump and attach the line borders to it so the area of sump and the little pool are right up against the rock. but sometimes, theres far too much else to be getting on with to split hairs/rocks like that...

Online alastairgott

  • forum hero
  • *****
  • Posts: 1983
Re: C19 Tutorial- Winnatts, discussion board
« Reply #26 on: March 05, 2021, 07:15:24 pm »
2) it depends on what rocks you want to achieve, some rocks receive more attention than others, I quite like these arty rocks from a Sheffield Uni art student. which I traced with rock edges. rock borders however create the slightly shaded area in the middle of them, and this is written into the code, so I believe that shade can be changed (if you wanted to do this) [Therion] Different Color for Rocks? (speleo.sk)




Online alastairgott

  • forum hero
  • *****
  • Posts: 1983
Re: C19 Tutorial- Winnatts, discussion board
« Reply #27 on: March 05, 2021, 07:23:27 pm »
3) Possibly you could combine areas, but I would ask why?

If your thinking your cave will be more than say 50-200m, then the more areas your adding in, the higher the processing time therion will take, try using area blocks and generating the PDF a couple of times. the blocks are never quite in the same place, so the software if recomputing the block locations every time you run the model.

For this reason, people tend to advise using the following order for drawing things.
Use points first, if it can't be drawn with a point, then try a line, and as a last resort an area.

PS Sand in therion looks rubbish, a smattering of dots, making a piece of toast creates more crumbs!

Online alastairgott

  • forum hero
  • *****
  • Posts: 1983
Re: C19 Tutorial- Winnatts, discussion board
« Reply #28 on: March 05, 2021, 07:53:03 pm »
4) yes, as I already alluded to there are ways of using metapost to change the way the area blocks and area debris behave, but this is by defining your own symbol (I'm unsure, but this may have been actually implemented in a later version of Therion so blocks and debris can now be defined).

Irrespective, it's good to know how to define your own should you wish.


The three things you will need to do is to set up a layout in the config file to disrupt the standard generation of the pdf. see the addition of the "layout local" to the pdf export command.


Then you need to assign some symbols (in the layout), in the below case we have used "symbol-assign area debris TEST"

This tells the software to look for this when generating an area debris, rather than using the standard "factory settings".

Before I move on, it's important that you notice that all of these commands are between a "layout local" and endlayout command. the same is true when we come onto the metapost, which has a "code metapost" and endcode command wrapping it.
With the layout, you can call it anything, layout smallcave, layout Matrixmansmells.
eg. export map -layout Matrixmansmells -o tinycave.pdf
layout Matrixmansmells

scale 1 100
symbol-set NZSS
symbol-hide group cave-centreline
endlayout
#####

once you've included the code metapost command, you can initiate your symbol using

initsymbol ("a_debris_TEST");

and then defining all the below guff (probably best to copy and paste it). all the numbers mean something, but have a play and see what you can come up with. There is probably the perfect block and the perfect debris. but god knows if we can agree on that. If you want to have a play with adding in other things using metapost, there's a lot there on the webpage I posted up yesterday, I don't really think you'll get bored...


ps. i'm not clever enough to come up with the below code, so don't give me any credit for the debris/blocks but we all share ideas :hug:
Code: [Select]
source testrocks.th2
 export map -layout local -o testrocks.pdf
 
 #input blocks_AUT
 #input blocks_SKBB
 
 layout local
 scale 1 100
 symbol-set NZSS
 symbol-hide group cave-centreline
 #copy blocksAUT
 #copy blocksSKBB
 symbol-assign area debris TEST
 symbol-assign area blocks TEST
 #symbol-assign area blocks AUT
 #symbol-assign area blocks SKBB
 
 code metapost
 
 initsymbol ("a_debris_TEST");
 initsymbol ("a_blocks_TEST");
 
 def a_blocks_TEST (expr p) = T:=identity; symbol_distance:=1; scale_factor:= 0.8; pickup PenC; path q, qq; q = bbox p; pair outside; outside:= ulcorner q + up; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step symbol_distance*uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.05uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) scaled (uniformdeviate(0.7)+scale_factor ) rotated uniformdeviate(360) shifted ((i,j) randomized 0.75uu); if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; else: qq:= qq scaled (uniformdeviate(.2)+.5 ) if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; fi; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef;
 
 def a_debris_TEST (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step u until xpart urcorner q: for j = ypart llcorner q step u until ypart urcorner q: qq := punked (((-.2u,-.2u)--(.2u,-.2u)--(.2u,.2u)--(-.2u,.2u)--cycle) randomized (u/2)) rotated uniformdeviate(360) shifted ((i,j) randomized u); if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef;
 
 endcode
 endlayout

Online alastairgott

  • forum hero
  • *****
  • Posts: 1983
Re: C19 Tutorial- Winnatts, discussion board
« Reply #29 on: March 05, 2021, 08:07:19 pm »
5) i'd use italics and breaks in your .th file, <br> introduces a break, and <it> makes it italics afterwards.
such as -title "Winnatts head cave<br><it>Beyond the sewer"

6) https://therion.speleo.sk/wiki/tips#hiding_particular_symbols_from_legend

Offline Matrixman355

  • Newbie
  • *
  • Posts: 9
  • SUSS, TSG
Re: C19 Tutorial- Winnatts, discussion board
« Reply #30 on: March 06, 2021, 02:28:20 pm »
Thanks a bunch for the detailed answers! (I've attached my latest version)
Don't feel like I'm demanding your time to write all this out, a lot of this is mostly sting my curiosity (at least, until we're underground again).

For some reason, I'm particularly interested in custom symbols. I think I have some understanding of how the custom symbols work, after some reading - or at least the bits that matter to me right now.

The only additional part of that code I'd like to understand more is where-abouts it overwrites the existing symbol.
This is tied to the possibility to add symbols, as I think is described here: http://marcocorvi.altervista.org/caving/tbe/m_07/m_074.htm

Worded a different way: I'm not sure where the example code in 4) redefines the two area types native to Therion, and if it's possible to write metapost to make new symbols without overwriting existing.

I assume my answers lie somewhere within https://therion.speleo.sk/wiki/metapost?s[ but I've not had luck finding them yet.


PS. It was interesting to note that my version_A was 51kB, whereas my (only slightly different) version_B is 70kB.

Online pwhole

  • forum hero
  • *****
  • Posts: 2666
  • TSG, DCA, PDMHS
    • Phil Wolstenholme website
Re: C19 Tutorial- Winnatts, discussion board
« Reply #31 on: March 06, 2021, 04:41:43 pm »
Very nice! This is all good stuff - keep it up ;)

Offline andrew

  • addict
  • **
  • Posts: 123
Re: C19 Tutorial- Winnatts, discussion board
« Reply #32 on: March 06, 2021, 07:42:43 pm »
Thanks a bunch for the detailed answers! (I've attached my latest version)
Don't feel like I'm demanding your time to write all this out, a lot of this is mostly sting my curiosity (at least, until we're underground again).

For some reason, I'm particularly interested in custom symbols. I think I have some understanding of how the custom symbols work, after some reading - or at least the bits that matter to me right now.

The only additional part of that code I'd like to understand more is where-abouts it overwrites the existing symbol.
This is tied to the possibility to add symbols, as I think is described here: http://marcocorvi.altervista.org/caving/tbe/m_07/m_074.htm

Worded a different way: I'm not sure where the example code in 4) redefines the two area types native to Therion, and if it's possible to write metapost to make new symbols without overwriting existing.

I assume my answers lie somewhere within https://therion.speleo.sk/wiki/metapost?s[ but I've not had luck finding them yet.


PS. It was interesting to note that my version_A was 51kB, whereas my (only slightly different) version_B is 70kB.

I'd like to answer your question, however your question is a little unclear, but I'll try my best

Maybe all you are looking for is that the symbol is overridden in the layout nest.

Each symbol can really only have one definition per plan or elevation in a survey, there are certain things you can change like the size or the text of a label for each use of a symbol. It would be strange if a wall in one part of a survey was different from a wall in a different part. That said For the symbol wall there are other options like wall that is made of mud, really a rock wall and a mud wall are different symbols, Wall just defaults to rock. It is possible to do very complex things, for example at the last CSG advanced survey meeting we looked at the possibility of having different. For boulder types in the same survey rather than a generic type. Contained in the link given earlier is the outcome Customisable Area Blocks with Different Number of Sides , you'll need to search or scroll as the link is not to the sub sections. This definition lets you define blocks and then some parameters to control how those block look.

When you define your own symbol and initiate it, you override the symbol that would have been used, there are different sets of symbol that can be used, or mixed if you want, Therion is very powerful, but that inevitably makes some of the more advanced features complex. This sort of question is probably best asked on the mailing list, which is likely to be the most friendly mailing list/forum you'll ever find.

 

Main Menu

Forum Home Help Search
SimplePortal 2.3.5 © 2008-2012, SimplePortal