CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Contour Drawing Algorithm

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2002, 17:35
Default Contour Drawing Algorithm
  #1
Abhijit
Guest
 
Posts: n/a
Hi,

Can anyone direct me to a paper/book that discribes algorithm to find Isolines, given a variable distribution in a domain phi(x,y) and x,y coordinates of points at which phi is known.

Thanks

Abhijit
  Reply With Quote

Old   June 3, 2002, 02:54
Default Re: Contour Drawing Algorithm
  #2
adarsh
Guest
 
Posts: n/a
use matlab software .. adarsh
  Reply With Quote

Old   June 3, 2002, 12:53
Default Re: Contour Drawing Algorithm
  #3
Abhijit Tilak
Guest
 
Posts: n/a
That's a trivial answer

Abhijit
  Reply With Quote

Old   June 3, 2002, 17:26
Default Re: Contour Drawing Algorithm
  #4
kunal
Guest
 
Posts: n/a
i generally use gri for drawing vectors to color contours. it has a very nice FAQ and documentation and you can easily get scripts from there. gri can be downloaded from gri.sourceforgr.net

if you decide to use gri and have any problems using it let me know

-kunal
  Reply With Quote

Old   June 4, 2002, 03:06
Default Re: Contour Drawing Algorithm
  #5
adarsh
Guest
 
Posts: n/a
kunal , can you pleas echeck the url again .. i am unable to get it..pls check the spellings.. adarsh
  Reply With Quote

Old   June 4, 2002, 04:38
Default Re: Contour Drawing Algorithm
  #6
Rami
Guest
 
Posts: n/a
it is http://gri.sourceforge.net
  Reply With Quote

Old   June 4, 2002, 09:57
Default Re: Contour Drawing Algorithm
  #7
Oleg Melnik
Guest
 
Posts: n/a
You can use PGPLOT. It's a fortan package working on most platforms.

http://www.astro.caltech.edu/~tjp/pgplot/

Oleg
  Reply With Quote

Old   June 6, 2002, 14:19
Default Re: Contour Drawing Algorithm
  #8
Adarsh
Guest
 
Posts: n/a
is there any advantage offered by gri or PGPLOT over matlab .. can these packages support 3-d visualizations .. infact i am looking for a package for 3-d viewing of a NS-computation... thanks in advance

Adarsh
  Reply With Quote

Old   June 7, 2002, 05:55
Default Re: Contour Drawing Algorithm
  #9
Rob Mason
Guest
 
Posts: n/a
The main advantage has to be that gri and PGPLOT are free and easily available online. I've never used gri but know that PGPLOT can be used for 3D visualisations. The best free software that I've found for 3D visualisations is Scilab, however. This is similar in design and use to matlab and loads of examples for 2D and 3D plotting can be found online. Scilab is also available for most platforms and in my experience is very easy to install on both windows and unix.

visit http://www.scilab.org/ for information, examples, and downloading of the software

Rob
  Reply With Quote

Old   June 7, 2002, 08:20
Default Re: Contour Drawing Algorithm
  #10
senthil
Guest
 
Posts: n/a
hi you can use Plotmtv. it's a small and good package for contours. You can get it online. Just search in google for Plotmtv you'll get it. bye senthil
  Reply With Quote

Old   June 7, 2002, 17:01
Default Re: Contour Drawing Algorithm
  #11
Jonas Holdeman
Guest
 
Posts: n/a
Since no one has addressed your question directly, I will give it a shot.

Efficient contour plotting was a matter of great interest maybe 20 years ago. There were a number of algorithms published. One source of published algorithms was the journal "Communications of the Association for Computing Machinery" (CACM) and the set of algorithms was referred to as the "Collected Algorithms of the ACM." Later the algorithms were published in a special journal "Transactions on mathematical software" (TOMS).

There may be better algorithms now, but the old method went something like this:

(1) Assume you have a plot package that can plot straight line segments. (2) Construct a fine grid with (x,y) coordinates over the domain on which you want to plot. (3) Evaluate the function to be coutoured at each node by computing the function or perhaps interpolating some discrete approximation. (4) Select a list of coutour levels to be plotted. (5) For each rectangle of the grid: (a) Find the largest and smallest function values on the corners. (b) Ignore the contour levels outside the range of the largest and smallest values. (c) For each acceptable contour and for each edge, find the coordinate values of the intersection of the contour level and the straight line joining the function values at the corners. (d) Plot the line segments joining coordinates with equal contour values. END

That is enough to give you contours, but you probably won't like it. You probably want to label contours, and there will be problems when a saddle point lies inside a rectangle, and there are axis labels, etc., etc., etc.

For all those details you would best follow the advice given previously. But the above description is enough to write a contouring program.
  Reply With Quote

Old   June 8, 2002, 01:06
Default Re: Contour Drawing Algorithm
  #12
Abhijit Tilak
Guest
 
Posts: n/a
Hi Jonas,

Thanks for your answer. Actually I should have said "Contour Finding Algorithm" I was looking for something like this.I will look out for the references you gave. Actually I don't need to draw the contours just find the x,y position related to particular value of phi=const.This subroutine will plug in to my code. i am solving a 2-D Inverse problem in heat conduction where T(x,y) at surface of a body is known. Intermidiate step involves finding surface of phi=const, then extracting x & y coordinates corresponding to that phi=c & update the guess for unknown geometry. Anyway thanks for the answer.If you know anything further please let me know.

Abhijit Tilak.
  Reply With Quote

Old   June 10, 2002, 08:47
Default Re: Contour Drawing Algorithm
  #13
stefan
Guest
 
Posts: n/a
Try http://www.astronomy.swin.edu.au/~pb...ection/conrec/
  Reply With Quote

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GAMBIT] Plotting/Meshing a Contour Map (3D hill) VU_Engineer ANSYS Meshing & Geometry 6 January 28, 2014 06:59
Importing contour maps into Tecplot jcostex Tecplot 1 May 20, 2009 12:48
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm Yan Kai Main CFD Forum 0 April 18, 2007 03:48
About Phase Coupled SIMPLE (PC-SIMPLE) algorithm Yan Kai FLUENT 0 April 13, 2007 23:17
drawing of contour plots chinthakindi Main CFD Forum 1 April 27, 2004 04:33


All times are GMT -4. The time now is 18:04.