Details Ticket 5243


Comment | Reply | Take | Resolve


Serial Number 5243
Subject d.vect: better random color generation
Area wish6
Queue grass
Requestors hamish_nospam@yahoo.com
Owner none
Status open
Last User Contact Never contacted
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Oct 30 12:30:59 2006 (2 yr ago)
Created Sun Oct 29 08:12:06 2006 (2 yr ago)

Transaction History Ticket 5243


Sun, Oct 29 2006 08:12:06    Request created by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Sun, 29 Oct 2006 20:10:26 +1300
From Hamish <hamish_nospam@yahoo.com>
To grass-bugs@intevation.de
Subject d.vect: better random color generation
Message-Id <20061029201026.72a37491.hamish_nospam@yahoo.com>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=1.7 tagged_above=-999 required=3 tests=[BAYES_20=-1, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level *
[wish]

Hi,

currently "d.vect -c" random colors is limited to 16 colors, which do
not rotate between calls. (you get the same colors every time, d.redraw
doesn't help if you don't like the results)

see display/d.vect/plot.h for current candidates.

I suggest using random color code from lib/gis/color_rand.c to do a
better job. It seems to work pretty well.


or if that won't work (too many cats to store RGB values) start with
random seed and calculate R,G,B values by some mathematical function
which will give the same answers for those 3 variables within the module
run.


thanks,
Hamish


Sun, Oct 29 2006 10:23:52    Area changed to wish6 by hbowman  
Mon, Oct 30 2006 12:30:59    Comments added by hbowman  
On second thought, it is probably important to be able to keep a random color
map once you've found one you like. e.g. for output to ps.map.

So the question is how to seed the random colors? save a color_seed file into
the $MAPSET/vector/$MAPNAME dir???


Hamish
Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request