pBe Posted June 16, 2012 Posted June 16, 2012 How about finding the minimum positive value from a file and starts color from 1 to the end of positive values and same for the negative values. Hows that again? say for example min is 12.. whats the color? and if its over 255 what color? -23.5 .... color? and 0.00 elevation? Quote
aaryan Posted June 16, 2012 Author Posted June 16, 2012 So whats your opinion pBe..? What should we look for? Quote
pBe Posted June 16, 2012 Posted June 16, 2012 So whats your opinion pBe..?What should we look for? Well.... ..... I see that you already "marked" the negative elevations wih an underscore. so it wouldnt matter if its the same color as the equivalent positive value. Also Bigals suggested using a larger range instaed of an increment of one. and you will always have to deal with color going over 255 Its your call aaryan. Quote
stevesfr Posted June 16, 2012 Posted June 16, 2012 SORRY for being very late Steve. I hope you forgive it.I didnt see your post as it was very late last night in my country. Anyways Good Morning.. Please find attached block drawing and if you update this routine please post for me too... [ATTACH]35403[/ATTACH] Thanks and Best Regards Aaryan Please do reply... @Aaryan... got it, thanks Steve Quote
BIGAL Posted June 17, 2012 Posted June 17, 2012 Pbe what I am getting at you have around 240 colours take min and max value then assign a step ratio for a big number if you want a rainbow effect a small number if want minimum colour change you never exceed colour say 250 for us would start at colour 10 prior to this we have set as black. You can take the elevation and work out a ratio number multiple by colour number. say 0-100 is z then say for rl =50, 50/100 = .5*240 =120 plus 10 so use colour 130. Quote
aaryan Posted June 18, 2012 Author Posted June 18, 2012 What should be the code if I want to restrict the colors upto color no.7. i.e converting all negative into postive and then we'll have a list of all positive values and after that finding a minimum value from a newly made list and starts from color no.1 and after reching the no.7 again starts from 1. Regards Aaryan Quote
MSasu Posted June 18, 2012 Posted June 18, 2012 You should adjust highlighted number with the desired limit: (setq theColor (1+ (fix (rem (abs (caddr data)) [color=magenta]7[/color])))) Quote
aaryan Posted June 18, 2012 Author Posted June 18, 2012 Thanks Mircea But will it work if the elevation in negative..? Regards Aaryan Quote
MSasu Posted June 18, 2012 Posted June 18, 2012 Yes, that example with work with both negative and positive values. Quote
aaryan Posted June 18, 2012 Author Posted June 18, 2012 Oh that's great that means if I have -27 and +27 both will be imported on same color within desired color limit. Quote
MSasu Posted June 18, 2012 Posted June 18, 2012 The answer is again yes - the colors will be distributed simmetrically around the origin. To test this please paste the code below on your command prompter: (progn (setq theEl -27) (repeat (1+ (* 2 (abs theEl))) (setq theColor (1+ (fix (rem (abs theEl) 7)))) (print (strcat "\For elevation " (rtos theEl 2 2) " the color is " (itoa theColor) ".")) (setq theEl (1+ theEl)) ) (princ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.