|
[Date Index]
[Thread Index]
[Author Index]
Re: Re: Polygon cutter
- To: mathgroup at smc.vnet.net
- Subject: [mg88012] Re: [mg87982] Re: Polygon cutter
- From: "W_Craig Carter" <ccarter at mit.edu>
- Date: Mon, 21 Apr 2008 14:40:13 -0400 (EDT)
- References: <200804200349.XAA11201@smc.vnet.net> <fuhf9s$ib1$1@smc.vnet.net>
On Mon, Apr 21, 2008 at 6:40 AM, <carlos at colorado.edu> wrote:
> On Apr 21, 1:21 am, "W_Craig Carter" <ccar... at mit.edu> wrote:
>
> The two most common cases are the first two. I expected this to be
> quicker than V1
> but it wasnt. On a MacBook Pro under 5.2:
>
> V1 25 microsec/polygon
> V2 24
> Which 30
>
> Similar rankings for 4.1 and 4.2. Havent tested it on 6.0.
I am glad to know it, surprised, but glad to know. Strange, because
you are evaluating ifs even though it has determined to be true
beforehand. So, let me suggest an (possible) improvement of V1:
findpoly[tb_,tt_]:= Module[{},
If [tb>0&&tb==tt, Return[Graphics[Polygon[{P1,P2,P4,P3}]];
:
:
If [tb==2&&tt==0, Return[Graphics[Polygon[{Pc3,P1,P2}]]];
]
This is more like your older subroutine...
--
W. Craig Carter
Prev by Date:
need help with Plot
Next by Date:
Re: Wolfram User Interface Research?
Previous by thread:
Re: Polygon cutter
Next by thread:
Re: Polygon cutter
|