LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2011, 04:23 AM   #16
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191

Man I am on a roll for things I am forgetting
In conv-contours.txt you will need to replace the following:
Code:
CONTOUR_SPACING=3 * 20

# with

    while(getline line < "camm2.defaults"){
        if(line ~ /Contours/){
            split(line,arr,"=")
            break
        }
        print line
    }
    CONTOUR_SPACING = arr[2] * 20
I made it 20 instead of 40 as you later divide by 2 and these numbers never change

I am not sure I understand the temp2.plot stuff?? Looking at your original code, the only change is to remove any lines containing "SP2;" (which the temp.plot you supplied does not have).
So no ... there is no difference between the 2 files.
Quote:
I don't see any ref. to processing the split up objects files named 1 to xx
And again, neither do I in any of your code??
 
Old 01-03-2011, 04:54 AM   #17
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by grail View Post
And again, neither do I in any of your code??
@OP: Do you have any code to process the data? Or do you have an idea of how the algorithm looks like to achieve your goal? If I understood correctly so far, then you start, e.g., with a black circle and you want your script to compute the red circles, right?
Well, while this seems trivial for a circle, I think it is way, way more complicated for complex structures like 'Cafe' from your example. It won't be sufficient to simply exclude the 'enclosed' contours from processing. So please share your idea of how you want to do it.
 
Old 01-03-2011, 09:28 AM   #18
gary_in_springhill
Member
 
Registered: Mar 2008
Posts: 136

Original Poster
Rep: Reputation: 21
no code yet

I don't have any code to generate the descending contours but in theory I think it should work as explained in post #15. The objects in the graphic that are extracted into named files 1 to xx are to have the stepping contours applied to them and and all appended back to the original file (temp.plot) with a SP2; added before the append.

Would this entire task be easier in python? Or is bash and awk able to do it?

Keep in mind I'm willing to compensate you for your time...

Gary

quest@accesscable.net
 
Old 01-03-2011, 10:09 AM   #19
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Gary, so far as I can see after using your scripts and the ones I modified, we are getting the same output.

ie. We both generate 11 numbered files, temp2.plot, temp-contours.plot and a temporary temp-conv

List of all files after running script:
Code:
1  10  11  2  3  4  5  6  7  8  9  contours.sh  conv-contours.txt  minmax.awk  temp2.plot  temp-contours.plot  temp.plot
So I would need more information on what is required of the numbered files if that is to be encompassed in this part of the scripts?
 
Old 01-03-2011, 10:34 AM   #20
gary_in_springhill
Member
 
Registered: Mar 2008
Posts: 136

Original Poster
Rep: Reputation: 21
scripts

No that part doesn't exist yet
Those original scripts convert a absolute plot job to relative coordinates for a diff. kind of plotter. Works wonderful but I was hoping to save work and reuse them but maybe I should have started from scratch.
Thats where the real work is I need to create those interior contours from all those numbered objects in my original post I attached some code that was close but needed expansion to accomplish the task.
I'll attach it again:

If your loosing interest let me know..
Thanks

Gary
Attached Files
File Type: txt cam.py.txt (116.0 KB, 14 views)
 
Old 01-14-2011, 10:35 AM   #21
gary_in_springhill
Member
 
Registered: Mar 2008
Posts: 136

Original Poster
Rep: Reputation: 21
gave up

Contours will have to be supplied in the original input file and removed the feature as a option....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to loop over text file lines within bash script for loop? johnpaulodonnell Linux - Newbie 9 07-28-2015 03:49 PM
List 4 names from users list and output them to fbusers in numbered ascending order? fezzie Programming 4 02-10-2010 01:05 PM
LXer: Using Bash To Feed Command Output To A While Loop Without Using Pipes! LXer Syndicated Linux News 0 08-06-2008 12:10 PM
Bash loop using output of grep not working as needed Jim Pye Programming 7 01-16-2008 10:27 PM
How to loop or sort in bash, awk or sed? j4r0d Programming 1 09-09-2004 03:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration