Author Topic: C++ to lisp  (Read 9841 times)

0 Members and 1 Guest are viewing this topic.

pedroantonio123

  • Guest
C++ to lisp
« on: December 01, 2014, 05:45:00 AM »
Hi

Can someone please help translate the  C ++ code in Lisp.
There is a code to go from UTM Coordinates to lang long.

Thanks for the Help

PedroAntonio

Code: [Select]
public static void ToLatLon(double utmX, double utmY, string utmZone)
    {
        double latitude = 0;
        double longitude = 0;

        bool isNorthHemisphere = utmZone.Last() >= 'N';

        var diflat = -0.00066286966871111111111111111111111111;
        var diflon = -0.0003868060578;

        var zone = int.Parse(utmZone.Remove(utmZone.Length - 1));
        var c_sa = 6378137.000000;
        var c_sb = 6356752.314245;
        var e2 = Math.Pow((Math.Pow(c_sa, 2) - Math.Pow(c_sb, 2)), 0.5) / c_sb;
        var e2cuadrada = Math.Pow(e2, 2);
        var c = Math.Pow(c_sa, 2) / c_sb;
        var x = utmX - 500000;
        var y = isNorthHemisphere ? utmY : utmY - 10000000;

        var s = ((zone * 6.0) - 183.0);
        var lat = y / (6366197.724 * 0.9996); // Change c_sa for 6366197.724
        var v = (c / Math.Pow(1 + (e2cuadrada * Math.Pow(Math.Cos(lat), 2)), 0.5)) * 0.9996;
        var a = x / v;
        var a1 = Math.Sin(2 * lat);
        var a2 = a1 * Math.Pow((Math.Cos(lat)), 2);
        var j2 = lat + (a1 / 2.0);
        var j4 = ((3 * j2) + a2) / 4.0;
        var j6 = (5 * j4 + a2 * Math.Pow((Math.Cos(lat)), 2)) / 3.0; // saque a2 de multiplicar por el coseno de lat y elevar al cuadrado
        var alfa = (3.0 / 4.0) * e2cuadrada;
        var beta = (5.0 / 3.0) * Math.Pow(alfa, 2);
        var gama = (35.0 / 27.0) * Math.Pow(alfa, 3);
        var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
        var b = (y - bm) / v;
        var epsi = ((e2cuadrada * Math.Pow(a, 2)) / 2.0) * Math.Pow((Math.Cos(lat)), 2);
        var eps = a * (1 - (epsi / 3.0));
        var nab = (b * (1 - epsi)) + lat;
        var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
        var delt = Math.Atan(senoheps / (Math.Cos(nab)));
        var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));

        longitude = (delt / Math.PI) * 180 + s;
        latitude = (((lat + (1 + e2cuadrada * Math.Pow(Math.Cos(lat), 2) - (3.0 / 2.0) * e2cuadrada * Math.Sin(lat) * Math.Cos(lat) * (tao - lat)) * (tao - lat))) / Math.PI) * 180; // era incorrecto el calculo

        Console.WriteLine("Latitud: " + latitude.ToString() + "\nLongitud: " + longitude.ToString());

    }

Jeff H

  • Needs a day job
  • Posts: 6150
Re: C++ to lisp
« Reply #1 on: December 01, 2014, 06:50:53 AM »
It looks like you have a C# snippet and not C++

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #2 on: December 01, 2014, 07:30:42 AM »
It looks like you have a C# snippet and not C++
Correct! That's definitely NOT C++. The use of var already shows something's different, if it was C++ (and only the newest C++) a similar idea would have used auto instead of var. But the clincher is the use of the Math library for the Pow method, if it was C++ it would have been a situation of adding a include clause for std::pow or math.h and then simply a function call to pow instead (not to mention if it was an object oriented library then it should have been Math->Pow instead of Math.Pow).

Anyhow, to get back to the OP's request, here's a start to show you the general idea of a direct translation:
Code - Auto/Visual Lisp: [Select]
  1. (defun ToLatLon (utmX utmY utmZone)
  2.   (setq latitude 0.0
  3.         longitude 0.0
  4.         isNorthHemisphere (wcmatch utmZone "*[Nn]")
  5.         diflat -0.00066286966871111111111111111111111111
  6.         diflon -0.0003868060578
  7.         zone (atoi (substr utmZone 1 (1- (strlen utm))))
  8.         c_sa 6378137.0
  9.         c_sb 6356752.314245
  10.         e2 (/ (expt (- (expt c_sa 2) (expt c_sb 2)) 0.5) c_sb)
  11.         ;; Carry on with same principles - the in-line maths are simply changed to polish notation
  12.   )
  13.   (princ "\nLatitud: ")
  14.   (princ latitude)
  15.   (princ "\nLongitud: ")
  16.   (princ longitude)
  17. )
Just carry on doing th exact same things for the other variables also.

Edit: Just to ensure your Lisp code doesn't screw up something else - you would need to localize those variables. For an explanation of how and why see Lee's tut on the subject: http://www.lee-mac.com/localising.html

And a quick way to get VLIDE to help you localize them: http://www.lee-mac.com/quicklocalising.html
« Last Edit: December 01, 2014, 08:03:21 AM by irneb »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: C++ to lisp
« Reply #3 on: December 01, 2014, 09:09:39 AM »
This may be of interest.
https://github.com/jl2/utm/
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #4 on: December 01, 2014, 09:22:51 AM »
This may be of interest.
https://github.com/jl2/utm/
Very nice! Not to mention it does the reverse also: LatLon->UTM.

Though it's written in Common Lisp. Some of those things aren't available for AutoLisp - I mean stuff like the setf and hash tables would need to be a setq (i.e. re-create the entire list each time instead of just setting an item in it) and a normal association list. But the rest should be easy to translate to AL as is.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

ymg

  • Guest
Re: C++ to lisp
« Reply #5 on: December 01, 2014, 11:31:05 AM »
There is also the proj.lsp library by David Allison in Autolisp which can be downloaded
here:  http://www.usouthal.edu/geography/allison/mappro/mappro.zip

Does Transverse Mercator, Polyconic, Lambert Conformal Conic, Alber's Equal Area, and Mercator.

ymg

pedroantonio123

  • Guest
Re: C++ to lisp
« Reply #6 on: December 02, 2014, 01:53:54 AM »
Thanks for the help. I tried the convert. Everything I have not done. Can someone please help me?

Code: [Select]
        var e2cuadrada = Math.Pow(e2, 2);
(setq e2cuadrada (expt e2 2))
 
        var c = Math.Pow(c_sa, 2) / c_sb;
(setq c (/ (expt c_sa 2) c_sb)
 
        var x = utmX - 500000;
(setq x (- utmX 500000))
 
        var y = isNorthHemisphere ? utmY : utmY - 10000000;
(setq y (if isNorthHemisphere (/ utmY (- utmY 10000000))))
 
        var s = ((zone * 6.0) - 183.0);
(setq s (- (* zone 6.0) 183.0))
 
        var lat = y / (6366197.724 * 0.9996); // Change c_sa for 6366197.724
(setq lat (/ y (* 6366197.724 0.9996)))
 
        var v = (c / Math.Pow(1 + (e2cuadrada * Math.Pow(Math.Cos(lat), 2)), 0.5)) * 0.9996;
(setq v (* (/ c (expt (+ 1 (* e2cuadrada (expt (cos lat) 2) 0.5)) 0.9996))
 
        var a = x / v;
(setq a (/ x v))
 
        var a1 = Math.Sin(2 * lat);
(setq a1 (sin (* 2 lat)))
 
        var a2 = a1 * Math.Pow((Math.Cos(lat)), 2);
(setq a2 (* a1 (expt (cos lat) 2)))
 
        var j2 = lat + (a1 / 2.0);
(setq j2 (+ lat (/ a1 2.0)))
 
        var j4 = ((3 * j2) + a2) / 4.0;
(setq j4 (/ (+ (* 3 j2) a2) 4.0))
 
        var j6 = (5 * j4 + a2 * Math.Pow((Math.Cos(lat)), 2)) / 3.0;
(setq j6 (/ (+ (* 5 j4) (* a2 (expt (cos lat) 2))) 3.0))
 
        var alfa = (3.0 / 4.0) * e2cuadrada;
(setq alfa (* (/ 3.0 4.0) e2cuadrada))
 
        var beta = (5.0 / 3.0) * Math.Pow(alfa, 2);
(setq beta (* (/ 5.0 3.0) (expt alpfa 2)))       
       
        var gama = (35.0 / 27.0) * Math.Pow(alfa, 3);
(setq gama (* (/ 35.0 27.0) (expt alfa 3)))
 
        var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
(setq bm (* 0.9996 c (- (+ (- lat (* alfa j2)) (* beta j4)) (* gama j6))))   
       
        var b = (y - bm) / v;
(setq b (/ (- y bm) v))       
       
        var epsi = ((e2cuadrada * Math.Pow(a, 2)) / 2.0) * Math.Pow((Math.Cos(lat)), 2);
(setq epsi (* (/ (* e2cuadrada (expt a 2)) 2.0) (expt (cos lat) 2)))
 
        var eps = a * (1 - (epsi / 3.0));
(setq eps (* a (- 1 (/ epsi 3.0))))       
       
        var nab = (b * (1 - epsi)) + lat;
(setq nab (+ (* b (1- epsi)) lat))
 
        var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
(setq senoheps    (/ ????
   
        var delt = Math.Atan(senoheps / (Math.Cos(nab)));
(setq delt (/ ???)
 
        var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));
(setq tao (* ???       
 
        longitude = (delt / Math.PI) * 180 + s;
(setq longitude (+ (* (/ delt pi) 180) s))
 
       
        latitude = (((lat + (1 + e2cuadrada * Math.Pow(Math.Cos(lat), 2) - (3.0 / 2.0) * e2cuadrada * Math.Sin(lat) * Math.Cos(lat) * (tao - lat)) * (tao - lat))) / Math.PI) * 180; // era incorrecto el calculo
(setq latitude ????



irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #7 on: December 02, 2014, 02:34:51 AM »
Thanks for the help. I tried the convert. Everything I have not done. Can someone please help me?
Here's one error in that translation. The C# conditional operator is like a Lisp if statement - the piece following ? is the then portion, and the piece following the : is the else portion. So the translation should rather be:
Code - Auto/Visual Lisp: [Select]
  1. ;; var y = isNorthHemisphere ? utmY : utmY - 10000000;
  2. (setq y (if isNorthHemisphere utmY (- utmY 10000000)))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #8 on: December 02, 2014, 03:12:52 AM »
Also, if you've got issues with converting infix notation to prefix (i.e Polish / s-expressions) for Lisp. You could try my Lisp code to do those things for you: http://www.theswamp.org/index.php?topic=41681.10

Just note I have found some errors in it before. I cannot guarantee that it works in every single instance - though it "should"  :wink:

As an example, here's that long line you're having problems with:
Code: [Select]
_$ (infix->prefix '(((((lat + (1 + e2cuadrada * Cos(lat) ^ 2) - (3.0 / 2.0) * e2cuadrada * Sin(lat) * Cos(lat) * (tao - lat)) * (tao - lat))) / PI) * 180))
(* (/ (* (+ LAT (- (+ 1 (* E2CUADRADA (^ (COS LAT) 2))) (* (/ 3.0 2.0) (* E2CUADRADA (* (SIN LAT) (* (COS LAT) (- TAO LAT))))))) (- TAO LAT)) PI) 180)
Note I had to do a bit of altering in there - e.g. Changing the Math.Pow into ^ and Math.Sin into Sin. Else it went all haywire.

Thereafter the ^ function is simply expt. So you either add something like this:
Code - Auto/Visual Lisp: [Select]
Or you find-n-replace all ^ with expt in that line.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pedroantonio123

  • Guest
Re: C++ to lisp
« Reply #9 on: December 04, 2014, 02:08:15 AM »
Thanks for the help. There are still 3 lines to translate. Can anyone help me with this yet?

Thank you  :-P  :-D


Code: [Select]
        var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
(setq senoheps    (/ ????
   
        var delt = Math.Atan(senoheps / (Math.Cos(nab)));
(setq delt (/ ???)
 
        var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));
(setq tao (* ???   

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #10 on: December 04, 2014, 02:54:44 AM »
First you need to know those functions. E.g. C#'s Math.Exp raises the math constant e to the specified power: http://msdn.microsoft.com/en-us/library/system.math.exp(v=vs.110).aspx

The same function in AutoLisp is simply exp: http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-FD0C918B-A162-4939-9F4E-FFE8863C3FC8

Same goes for:
Unfortunately AutoLisp doesn't come standard with the tan function. But it's reasonably easy to make one yourself. Basically tan = sin/cos. So
Code - Auto/Visual Lisp: [Select]
  1. (defun tan (x) (/ (sin x) (cos x)))

Though that means you run the risk of getting a divide-by-zero error on angles like 90 degrees. So a safer way might be:
Code - Auto/Visual Lisp: [Select]
  1. (defun tan (x / c)
  2.    (if (= (setq c (cos x)) 0.0)
  3.       (* (if (< x 0) -1 1) 1.7976931348623158e+308) ;Closest we can get to infinity using a double floating point
  4.       (/ (sin x) c)))

Then those 3 lines are:
Code - Auto/Visual Lisp: [Select]
  1. (setq senoheps (/ (- (exp eps) (exp (- eps))) 2.0))
  2. (setq delt (atan (/ senoheps (cos nab))))
  3. (setq tao (atan (* (cos delt) (tab nab))))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pedroantonio123

  • Guest
Re: C++ to lisp
« Reply #11 on: December 05, 2014, 07:19:05 AM »
Hello, I have now assembled everything.
It also works without error but the result is not correct.

 (ToLatLon 451602.19 4519076.99 "33N")
should Latitud: 40.821287 Longitud; 14.426080
but with (ToLatLon) Result is Latitud: 40.5467 Longitud: 14.4284

Can someone please check the code C#. Whether this outputs the correct result  :evil: :-P :oops: :cry: :-D

Thanks

Lisp Code
Code: [Select]
(defun ToLatLon (utmX utmY utmZone)

(defun tan (x / c)
(if (= (setq c (cos x)) 0.0)
(* (if (< x 0) -1 1) 1.7976931348623158e+308) ;Closest we can get to infinity using a double floating point
(/ (sin x) c)
)
)

        (setq latitude 0.0)
  (setq longitude 0.0)

    ;;bool isNorthHemisphere = utmZone.Last() >= 'N';
(setq isNorthHemisphere (wcmatch utmZone "*[Nn]"))

    ;;var diflat = -0.00066286966871111111111111111111111111;
        (setq diflat -0.00066286966871111111111111111111111111)

    ;;var diflon = -0.0003868060578;
(setq diflon -0.0003868060578)

    ;;var zone = int.Parse(utmZone.Remove(utmZone.Length - 1));
(setq zone (atoi (substr utmZone 1 (1- (strlen utmZone)))))

    ;;var c_sa = 6378137.000000;
(setq c_sa 6378137.0)
   
    ;;var c_sb = 6356752.314245;
(setq c_sb 6356752.314245)

    ;;var e2 = Math.Pow((Math.Pow(c_sa, 2) - Math.Pow(c_sb, 2)), 0.5) / c_sb;
(setq e2 (/ (expt (- (expt c_sa 2.0) (expt c_sb 2.0)) 0.5) c_sb))
   
    ;;var e2cuadrada = Math.Pow(e2, 2);
(setq e2cuadrada (expt e2 2.0))
 
    ;;var c = Math.Pow(c_sa, 2) / c_sb;
(setq c (/ (expt c_sa 2.0) c_sb))
 
    ;;var x = utmX - 500000;
(setq x (- utmX 500000))

    ;;var y = isNorthHemisphere ? utmY : utmY - 10000000;
(setq y (if isNorthHemisphere utmY (- utmY 10000000)))
 
    ;;var s = ((zone * 6.0) - 183.0);
(setq s (- (* zone 6.0) 183.0))
 
    ;;var lat = y / (6366197.724 * 0.9996); // Change c_sa for 6366197.724
(setq lat (/ y (* 6366197.724 0.9996)))
 
    ;;var v = (c / Math.Pow(1 + (e2cuadrada * Math.Pow(Math.Cos(lat), 2)), 0.5)) * 0.9996;
(setq v (* (/ c (expt (+ 1 (* e2cuadrada (expt (cos lat) 2) )) 0.5) ) 0.9996))
 
    ;;var a = x / v;
(setq a (/ x v))
 
    ;;var a1 = Math.Sin(2 * lat);
(setq a1 (sin (* 2.0 lat)))
 
    ;;var a2 = a1 * Math.Pow((Math.Cos(lat)), 2);
(setq a2 (* a1 (expt (cos lat) 2.0)))
 
    ;;var j2 = lat + (a1 / 2.0);
(setq j2 (+ lat (/ a1 2.0)))

    ;;var j4 = ((3 * j2) + a2) / 4.0;
(setq j4 (/ (+ (* 3.0 j2) a2) 4.0))
 
    ;;var j6 = (5 * j4 + a2 * Math.Pow((Math.Cos(lat)), 2)) / 3.0;
(setq j6 (/ (+ (* 5.0 j4) (* a2 (expt (cos lat) 2.0))) 3.0))
 
    ;;var alfa = (3.0 / 4.0) * e2cuadrada;
(setq alfa (* (/ 3.0 4.0) e2cuadrada))
 
    ;;var beta = (5.0 / 3.0) * Math.Pow(alfa, 2);
(setq beta (* (/ 5.0 3.0) (expt alfa 2.0)))       
       
    ;;var gama = (35.0 / 27.0) * Math.Pow(alfa, 3);
(setq gama (* (/ 35.0 27.0) (expt alfa 3.0)))
 
    ;;var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
(setq bm (* 0.9996 c (- lat (+ (* alfa j2) (* beta j4)) (* gama j6))))   ;;;not shore
         
    ;;var b = (y - bm) / v;
(setq b (/ (- y bm) v))       
       
    ;;var epsi = ((e2cuadrada * Math.Pow(a, 2)) / 2.0) * Math.Pow((Math.Cos(lat)), 2);
(setq epsi (* (/ (* e2cuadrada (expt a 2.0)) 2.0) (expt (cos lat) 2.0)))
 
    ;;var eps = a * (1 - (epsi / 3.0));
(setq eps (* a (- 1 (/ epsi 3.0))))       
       
    ;;var nab = (b * (1 - epsi)) + lat;
(setq nab (+ (* b (1- epsi)) lat))
 
    ;;var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
(setq senoheps (/ (- (exp eps) (exp (- eps))) 2.0))
   
    ;;var delt = Math.Atan(senoheps / (Math.Cos(nab)));
(setq delt (atan (/ senoheps (cos nab))))
 
    ;;var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));
(setq tao (atan (* (cos delt) (tan nab))))       
 
    ;;longitude = (delt / Math.PI) * 180 + s;
(setq longitude (+ (* (/ delt pi) 180.0) s))
       
    ;;latitude = (((lat + (1 + e2cuadrada * Math.Pow(Math.Cos(lat), 2) - (3.0 / 2.0) * e2cuadrada * Math.Sin(lat) * Math.Cos(lat) * (tao - lat)) * (tao - lat))) / Math.PI) * 180; // era incorrecto el calculo
(setq latitude (* (/ (+ lat (* (- (+ 1 (* e2cuadrada (expt (cos lat) 2.0))) (* (/ 3.0  2.0) e2cuadrada (sin lat) (cos lat) (- tao lat))) (- tao lat))) pi) 180.0))


    (princ "\nLatitud: ")
    (princ latitude)
    (princ "\nLongitud: ")
    (princ longitude)
    (princ)
)

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #12 on: December 06, 2014, 08:00:17 AM »
Nope, it seems as if the C# code is running it properly. E.g. running this in MonoDevelop in Linux:
Code - C#: [Select]
  1. using System;
  2.  
  3. namespace ToLatLon_Test
  4. {
  5.         class MainClass
  6.         {
  7.                 public static void Main(string[] args)
  8.                 {
  9.                         Console.WriteLine("UTM to LatLon test");
  10.                         string input;
  11.                         double utmX, utmY;
  12.                         string Zone;
  13.                         try {
  14.                                 Console.Write("Enter utmX: ");
  15.                                 input = Console.ReadLine();
  16.                                 utmX = double.Parse(input);
  17.                                 Console.Write("Enter utmY: ");
  18.                                 input = Console.ReadLine();
  19.                                 utmY = double.Parse(input);
  20.                                 Console.Write("Enter UTM Zone: ");
  21.                                 Zone = Console.ReadLine();
  22.                                 Console.WriteLine();
  23.                                 ToLatLon(utmX, utmY, Zone);
  24.                         } catch(Exception e) {
  25.                                 Console.Write("Error: ");
  26.                                 Console.WriteLine(e.Message);
  27.                         }
  28.                 }
  29.  
  30.                 public static void ToLatLon(double utmX, double utmY, string utmZone)
  31.                 {
  32.                         double latitude = 0;
  33.                         double longitude = 0;
  34.  
  35.                         // Changed from utmZone.Last as the Linq version is much slower than simply indexing
  36.                         // the last position in the string's array of characters
  37.                         bool isNorthHemisphere = utmZone[utmZone.Length-1] >= 'N';
  38.  
  39.                         var diflat = -0.00066286966871111111111111111111111111;
  40.                         var diflon = -0.0003868060578;
  41.  
  42.                         var zone = int.Parse(utmZone.Remove(utmZone.Length - 1));
  43.                         var c_sa = 6378137.000000;
  44.                         var c_sb = 6356752.314245;
  45.                         var e2 = Math.Pow((Math.Pow(c_sa, 2) - Math.Pow(c_sb, 2)), 0.5) / c_sb;
  46.                         var e2cuadrada = Math.Pow(e2, 2);
  47.                         var c = Math.Pow(c_sa, 2) / c_sb;
  48.                         var x = utmX - 500000;
  49.                         var y = isNorthHemisphere ? utmY : utmY - 10000000;
  50.  
  51.                         var s = ((zone * 6.0) - 183.0);
  52.                         var lat = y / (6366197.724 * 0.9996); // Change c_sa for 6366197.724
  53.                         var v = (c / Math.Pow(1 + (e2cuadrada * Math.Pow(Math.Cos(lat), 2)), 0.5)) * 0.9996;
  54.                         var a = x / v;
  55.                         var a1 = Math.Sin(2 * lat);
  56.                         var a2 = a1 * Math.Pow((Math.Cos(lat)), 2);
  57.                         var j2 = lat + (a1 / 2.0);
  58.                         var j4 = ((3 * j2) + a2) / 4.0;
  59.                         var j6 = (5 * j4 + a2 * Math.Pow((Math.Cos(lat)), 2)) / 3.0; // saque a2 de multiplicar por el coseno de lat y elevar al cuadrado
  60.                         var alfa = (3.0 / 4.0) * e2cuadrada;
  61.                         var beta = (5.0 / 3.0) * Math.Pow(alfa, 2);
  62.                         var gama = (35.0 / 27.0) * Math.Pow(alfa, 3);
  63.                         var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
  64.                         var b = (y - bm) / v;
  65.                         var epsi = ((e2cuadrada * Math.Pow(a, 2)) / 2.0) * Math.Pow((Math.Cos(lat)), 2);
  66.                         var eps = a * (1 - (epsi / 3.0));
  67.                         var nab = (b * (1 - epsi)) + lat;
  68.                         var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
  69.                         var delt = Math.Atan(senoheps / (Math.Cos(nab)));
  70.                         var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));
  71.  
  72.                         longitude = (delt / Math.PI) * 180 + s;
  73.                         latitude = (((lat + (1 + e2cuadrada * Math.Pow(Math.Cos(lat), 2) - (3.0 / 2.0) * e2cuadrada * Math.Sin(lat) * Math.Cos(lat) * (tao - lat)) * (tao - lat))) / Math.PI) * 180; // era incorrecto el calculo
  74.  
  75.                         Console.WriteLine("Latitud: " + latitude.ToString() + "\nLongitud: " + longitude.ToString());
  76.  
  77.                 }
  78.         }
  79. }
Produces the following:
Code: [Select]
UTM to LatLon test
Enter utmX: 451602.19
Enter utmY: 4519076.99
Enter UTM Zone: 33N

Latitud: 40.8212871342299
Longitud: 14.4260799700565

Press any key to continue...
« Last Edit: December 06, 2014, 08:10:03 AM by irneb »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #13 on: December 06, 2014, 08:26:39 AM »
Looking through your Lisp code ... this might be the culprit:
Code - Auto/Visual Lisp: [Select]
  1. ;;var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
  2. (setq bm (* 0.9996 c (- lat (+ (* alfa j2) (* beta j4)) (* gama j6))))   ;;;not shore
  3. ;; Should be something like this
  4. (setq bm (* 0.9996 c (- (+ (- lat (* alpha j2)) (* beta j4)) (* gama j6)))))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pedroantonio124

  • Guest
Re: C++ to lisp
« Reply #14 on: December 08, 2014, 04:40:17 AM »
Hello irneb,

Thanks for your help  :-)

Unfortunately, I still receive the wrong result with the lisp code.
Maybe I can find the mistake if I know the result of every line.
Could you let me the C # run through over again code? Please
With a Console.WriteLine for every line.

PedroAntonio  :evil:

Code: [Select]
public static void ToLatLon(double utmX, double utmY, string utmZone)
    {
        double latitude = 0;
        double longitude = 0;

        bool isNorthHemisphere = utmZone.Last() >= 'N';

        var diflat = -0.00066286966871111111111111111111111111;
        var diflon = -0.0003868060578;

        var zone = int.Parse(utmZone.Remove(utmZone.Length - 1));
        var c_sa = 6378137.000000;
        var c_sb = 6356752.314245;

        var e2 = Math.Pow((Math.Pow(c_sa, 2) - Math.Pow(c_sb, 2)), 0.5) / c_sb;
Console.WriteLine ("\n" e2.ToString() )

        var e2cuadrada = Math.Pow(e2, 2);
Console.WriteLine ("\n" e2cuadrada.ToString() )

        var c = Math.Pow(c_sa, 2) / c_sb;
Console.WriteLine ("\n" c.ToString() )

        var x = utmX - 500000;
Console.WriteLine ("\n" x.ToString() )

        var y = isNorthHemisphere ? utmY : utmY - 10000000;
Console.WriteLine ("\n" y.ToString() )

        var s = ((zone * 6.0) - 183.0);
Console.WriteLine ("\n" s.ToString() )

        var lat = y / (6366197.724 * 0.9996); // Change c_sa for 6366197.724
Console.WriteLine ("\n" lat.ToString() )

        var v = (c / Math.Pow(1 + (e2cuadrada * Math.Pow(Math.Cos(lat), 2)), 0.5)) * 0.9996;
Console.WriteLine ("\n" v.ToString() )

        var a = x / v;
Console.WriteLine ("\n" a.ToString() )

        var a1 = Math.Sin(2 * lat);
Console.WriteLine ("\n" a1.ToString() )

        var a2 = a1 * Math.Pow((Math.Cos(lat)), 2);
Console.WriteLine ("\n" a2.ToString() )

        var j2 = lat + (a1 / 2.0);
Console.WriteLine ("\n" j2.ToString() )

        var j4 = ((3 * j2) + a2) / 4.0;
Console.WriteLine ("\n" j4.ToString() )

        var j6 = (5 * j4 + a2 * Math.Pow((Math.Cos(lat)), 2)) / 3.0; // saque a2 de multiplicar por el coseno de lat y elevar al cuadrado
        Console.WriteLine ("\n" j6.ToString() )

var alfa = (3.0 / 4.0) * e2cuadrada;
Console.WriteLine ("\n" alfa.ToString() )

        var beta = (5.0 / 3.0) * Math.Pow(alfa, 2);
Console.WriteLine ("\n" beta.ToString() )

        var gama = (35.0 / 27.0) * Math.Pow(alfa, 3);
Console.WriteLine ("\n" gama.ToString() )

        var bm = 0.9996 * c * (lat - alfa * j2 + beta * j4 - gama * j6);
Console.WriteLine ("\n" bm.ToString() )

        var b = (y - bm) / v;
Console.WriteLine ("\n" b.ToString() )

        var epsi = ((e2cuadrada * Math.Pow(a, 2)) / 2.0) * Math.Pow((Math.Cos(lat)), 2);
Console.WriteLine ("\n" epsi.ToString() )

        var eps = a * (1 - (epsi / 3.0));
Console.WriteLine ("\n" eps.ToString() )

        var nab = (b * (1 - epsi)) + lat;
Console.WriteLine ("\n" nab.ToString() )

        var senoheps = (Math.Exp(eps) - Math.Exp(-eps)) / 2.0;
Console.WriteLine ("\n" senoheps.ToString() )

        var delt = Math.Atan(senoheps / (Math.Cos(nab)));
Console.WriteLine ("\n" delt.ToString() )

        var tao = Math.Atan(Math.Cos(delt) * Math.Tan(nab));
Console.WriteLine  ("\n" tao.ToString() )

        longitude = (delt / Math.PI) * 180 + s;
        latitude = (((lat + (1 + e2cuadrada * Math.Pow(Math.Cos(lat), 2) - (3.0 / 2.0) * e2cuadrada * Math.Sin(lat) * Math.Cos(lat) * (tao - lat)) * (tao - lat))) / Math.PI) * 180; // era incorrecto el calculo

        Console.WriteLine("Latitud: " + latitude.ToString() + "\nLongitud: " + longitude.ToString());

    }

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C++ to lisp
« Reply #15 on: December 08, 2014, 04:45:38 AM »
pedroantonio124,
Which AutoCAD build are you using ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

pedroantonio124

  • Guest
Re: C++ to lisp
« Reply #16 on: December 08, 2014, 04:54:23 AM »
AutoCad 2014

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #17 on: December 08, 2014, 05:30:16 AM »
Hello irneb,

Thanks for your help  :-)

Unfortunately, I still receive the wrong result with the lisp code.
Maybe I can find the mistake if I know the result of every line.
Could you let me the C # run through over again code? Please
With a Console.WriteLine for every line.

Rather than a WriteLine per line ... just get hold of a DotNet IDE and debug step through it.

You can get a free IDE, either of these would do:
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C++ to lisp
« Reply #18 on: December 08, 2014, 05:36:07 AM »
You want fries with this ?

Code - C#: [Select]
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace ToLatLon
  9. {
  10.     internal class Program
  11.     {
  12.         private static void Main(string[] args)
  13.         {
  14.             Console.Write("\n UTM to LatLon test.\n From theSwamp\n http://www.theswamp.org/index.php?topic=48330.0" );
  15.             Console.Write("\n\nEnter utmX value : " );
  16.             double utmX = double.Parse(Console.ReadLine());
  17.  
  18.             Console.Write("\nEnter utmY value : " );
  19.             double utmY = double.Parse(Console.ReadLine());
  20.  
  21.             Console.Write("\nEnterutmZone value : " );
  22.             string utmZone = Console.ReadLine();
  23.  
  24.             ToLatLon(utmX, utmY, utmZone);
  25.  
  26.             Console.ReadKey();
  27.         }
  28.  
  29.         public static void ToLatLon(double utmX, double utmY, string utmZone)
  30.         {
  31.             double latitude = 0;
  32.             double longitude = 0;
  33.  
  34.             bool isNorthHemisphere = utmZone.Last() >= 'N';
  35.  
  36.             var diflat = -0.00066286966871111111111111111111111111;
  37.             var diflon = -0.0003868060578;
  38.  
  39.             var zone = int.Parse(utmZone.Remove(utmZone.Length - 1));
  40.             var c_sa = 6378137.000000;
  41.             var c_sb = 6356752.314245;
  42.  
  43.             var e2 = Math.Pow((Math.Pow(c_sa, 2) - Math.Pow(c_sb, 2)), 0.5)/c_sb;
  44.             Console.WriteLine("\ne2:\t " + e2.ToString());
  45.  
  46.             var e2cuadrada = Math.Pow(e2, 2);
  47.             Console.WriteLine("\ne2cuadrada:\t " + e2cuadrada.ToString());
  48.  
  49.             var c = Math.Pow(c_sa, 2)/c_sb;
  50.             Console.WriteLine("\nc:\t " + c.ToString());
  51.  
  52.             var x = utmX - 500000;
  53.             Console.WriteLine("\nx:\t " + x.ToString());
  54.  
  55.             var y = isNorthHemisphere ? utmY : utmY - 10000000;
  56.             Console.WriteLine("\ny:\t " + y.ToString());
  57.  
  58.             var s = ((zone*6.0) - 183.0);
  59.             Console.WriteLine("\ns:\t " + s.ToString());
  60.  
  61.             var lat = y/(6366197.724*0.9996); // Change c_sa for 6366197.724
  62.             Console.WriteLine("\nlat:\t " + lat.ToString());
  63.  
  64.             var v = (c/
  65.                      Math.Pow(1 + (e2cuadrada*Math.Pow(Math.Cos(lat), 2)), 0.5))*
  66.                     0.9996;
  67.             Console.WriteLine("\nv:\t " + v.ToString());
  68.  
  69.             var a = x/v;
  70.             Console.WriteLine("\na:\t " + a.ToString());
  71.  
  72.             var a1 = Math.Sin(2*lat);
  73.             Console.WriteLine("\na1:\t " + a1.ToString());
  74.  
  75.             var a2 = a1*Math.Pow((Math.Cos(lat)), 2);
  76.             Console.WriteLine("\na2:\t " + a2.ToString());
  77.  
  78.             var j2 = lat + (a1/2.0);
  79.             Console.WriteLine("\nj2:\t " + j2.ToString());
  80.  
  81.             var j4 = ((3*j2) + a2)/4.0;
  82.             Console.WriteLine("\nj4:\t" + j4.ToString());
  83.  
  84.             var j6 = (5*j4 + a2*Math.Pow((Math.Cos(lat)), 2))/3.0;
  85.             // saque a2 de multiplicar por el coseno de lat y elevar al cuadrado
  86.             Console.WriteLine("\nj6:\t " + j6.ToString());
  87.  
  88.             var alfa = (3.0/4.0)*e2cuadrada;
  89.             Console.WriteLine("\nalfa:\t " + alfa.ToString());
  90.  
  91.             var beta = (5.0/3.0)*Math.Pow(alfa, 2);
  92.             Console.WriteLine("\nbeta:\t " + beta.ToString());
  93.  
  94.             var gama = (35.0/27.0)*Math.Pow(alfa, 3);
  95.             Console.WriteLine("\ngama:\t " + gama.ToString());
  96.  
  97.             var bm = 0.9996*c*(lat - alfa*j2 + beta*j4 - gama*j6);
  98.             Console.WriteLine("\nbm:\t " + bm.ToString());
  99.  
  100.             var b = (y - bm)/v;
  101.             Console.WriteLine("\nb:\t " + b.ToString());
  102.  
  103.             var epsi = ((e2cuadrada*Math.Pow(a, 2))/2.0)*
  104.                        Math.Pow((Math.Cos(lat)), 2);
  105.             Console.WriteLine("\nepsi:\t " + epsi.ToString());
  106.  
  107.             var eps = a*(1 - (epsi/3.0));
  108.             Console.WriteLine("\neps:\t " + eps.ToString());
  109.  
  110.             var nab = (b*(1 - epsi)) + lat;
  111.             Console.WriteLine("\nnab:\t " + nab.ToString());
  112.  
  113.             var senoheps = (Math.Exp(eps) - Math.Exp(-eps))/2.0;
  114.             Console.WriteLine("\nsenoheps:\t " + senoheps.ToString());
  115.  
  116.             var delt = Math.Atan(senoheps/(Math.Cos(nab)));
  117.             Console.WriteLine("\ndelt:\t " + delt.ToString());
  118.  
  119.             var tao = Math.Atan(Math.Cos(delt)*Math.Tan(nab));
  120.             Console.WriteLine("\ntao:\t " + tao.ToString());
  121.  
  122.             longitude = (delt/Math.PI)*180 + s;
  123.             latitude = (((lat +
  124.                           (1 + e2cuadrada*Math.Pow(Math.Cos(lat), 2) -
  125.                            (3.0/2.0)*e2cuadrada*Math.Sin(lat)*Math.Cos(lat)*
  126.                            (tao - lat))*(tao - lat)))/Math.PI)*180;
  127.             // era incorrecto el calculo
  128.  
  129.             Console.WriteLine("\nLatitud:\t " + latitude.ToString() +
  130.                 "\nLongitud:\t " + longitude.ToString());
  131.         }
  132.     }
  133. }
  134.  
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: C++ to lisp
« Reply #19 on: December 08, 2014, 06:05:44 AM »
Damn ... you're much to quick!

Anyhow, if you don't want to install anything new, you could use IDEone: http://ideone.com/5irS8R
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pedroantonio124

  • Guest
Re: C++ to lisp
« Reply #20 on: December 08, 2014, 06:06:25 AM »
Thanks  :-D

This was the mistake in the Lisp code
It now works  :lol: :-P ^-^ :laugh: :blank:

Code: [Select]
Incorrect: (setq eps (* a (1-  (/ epsi 3.0)))))
OK: (setq eps (* a (- 1 (/ epsi 3.0)))))

pedroantonio124

  • Guest
Re: C++ to lisp
« Reply #21 on: December 08, 2014, 10:45:05 AM »
Thanks to irneb and Kerry  :-)

example:
(utm2latlong 451602.19 4519076.99 "33N")
->40.821287°  14.426080°

PedroAntonio  :evil: :-P


Code: [Select]
(defun utm2latlong (utmX utmY utmZone / latitude longitude isNorthHemisphere diflat diflon zone c_sa
c_sb e2 e2cuadrada c x y s lat v a a1 a2 j2 j4 j6 alfa beta gama bm b
epsi eps nab senoheps delta tao longitude latitude)

(defun tan (x / c)
(if (= (setq c (cos x)) 0.0)
(* (if (< x 0) -1 1) 1.7976931348623158e+308) ;Closest we can get to infinity using a double floating point
(/ (sin x) c)
)
)

(setq LATLONG nil)
(setq isNorthHemisphere (wcmatch utmZone "*[Nn]"))
(setq diflat -0.00066286966871111111111111111111111111)
(setq diflon -0.0003868060578)
(setq zone (atoi (substr utmZone 1 (1- (strlen utmZone)))))
(setq c_sa 6378137.0)
(setq c_sb 6356752.314245)
(setq e2 (/ (expt (- (expt c_sa 2.0) (expt c_sb 2.0)) 0.5) c_sb))    
(setq e2cuadrada (expt e2 2.0))
(setq c (/ (expt c_sa 2.0) c_sb))
(setq x (- utmX 500000))
(setq y (if isNorthHemisphere utmY (- utmY 10000000)))
(setq s (- (* zone 6.0) 183.0))
(setq lat (/ y (* 6366197.724 0.9996)))
(setq v (* (/ c (expt (+ 1 (* e2cuadrada (expt (cos lat) 2) )) 0.5) ) 0.9996))
(setq a (/ x v))
(setq a1 (sin (* 2.0 lat)))
(setq a2 (* a1 (expt (cos lat) 2.0)))
(setq j2 (+ lat (/ a1 2.0)))
(setq j4 (/ (+ (* 3.0 j2) a2) 4.0))
(setq j6 (/ (+ (* 5.0 j4) (* a2 (expt (cos lat) 2.0))) 3.0))
(setq alfa (* (/ 3.0 4.0) e2cuadrada))
(setq beta (* (/ 5.0 3.0) (expt alfa 2.0)))     
(setq gama (* (/ 35.0 27.0) (expt alfa 3.0)))
(setq bm (* 0.9996 c (- (+ (- lat (* alfa j2)) (* beta j4)) (* gama j6))))
(setq b (/ (- y bm) v))       
(setq epsi (* (/ (* e2cuadrada (expt a 2.0)) 2.0) (expt (cos lat) 2.0)))
(setq eps (* a (- 1 (/ epsi 3.0))))   
(setq nab (+ (* b (- 1 epsi)) lat))
(setq senoheps (/ (- (exp eps) (exp (- eps))) 2.0))
(setq delt (atan (/ senoheps (cos nab))))
(setq tao (atan (* (cos delt) (tan nab))))     
(setq longitude (+ (* (/ delt pi) 180.0) s))
(setq latitude (* (/ (+ lat (* (- (+ 1 (* e2cuadrada (expt (cos lat) 2.0))) (* (/ 3.0  2.0) e2cuadrada (sin lat) (cos lat) (- tao lat))) (- tao lat))) pi) 180.0))
   
(setq LATLONG (list latitude longitude ))
LATLONG
(princ)
)

mailmaverick

  • Bull Frog
  • Posts: 495
Re: C++ to lisp
« Reply #22 on: February 22, 2017, 02:44:37 AM »
Thanks to irneb and Kerry  :-)

example:
(utm2latlong 451602.19 4519076.99 "33N")
->40.821287°  14.426080°

PedroAntonio  :evil: :-P


Code: [Select]
(defun utm2latlong (utmX utmY utmZone / latitude longitude isNorthHemisphere diflat diflon zone c_sa
c_sb e2 e2cuadrada c x y s lat v a a1 a2 j2 j4 j6 alfa beta gama bm b
epsi eps nab senoheps delta tao longitude latitude)

(defun tan (x / c)
(if (= (setq c (cos x)) 0.0)
(* (if (< x 0) -1 1) 1.7976931348623158e+308) ;Closest we can get to infinity using a double floating point
(/ (sin x) c)
)
)

(setq LATLONG nil)
(setq isNorthHemisphere (wcmatch utmZone "*[Nn]"))
(setq diflat -0.00066286966871111111111111111111111111)
(setq diflon -0.0003868060578)
(setq zone (atoi (substr utmZone 1 (1- (strlen utmZone)))))
(setq c_sa 6378137.0)
(setq c_sb 6356752.314245)
(setq e2 (/ (expt (- (expt c_sa 2.0) (expt c_sb 2.0)) 0.5) c_sb))    
(setq e2cuadrada (expt e2 2.0))
(setq c (/ (expt c_sa 2.0) c_sb))
(setq x (- utmX 500000))
(setq y (if isNorthHemisphere utmY (- utmY 10000000)))
(setq s (- (* zone 6.0) 183.0))
(setq lat (/ y (* 6366197.724 0.9996)))
(setq v (* (/ c (expt (+ 1 (* e2cuadrada (expt (cos lat) 2) )) 0.5) ) 0.9996))
(setq a (/ x v))
(setq a1 (sin (* 2.0 lat)))
(setq a2 (* a1 (expt (cos lat) 2.0)))
(setq j2 (+ lat (/ a1 2.0)))
(setq j4 (/ (+ (* 3.0 j2) a2) 4.0))
(setq j6 (/ (+ (* 5.0 j4) (* a2 (expt (cos lat) 2.0))) 3.0))
(setq alfa (* (/ 3.0 4.0) e2cuadrada))
(setq beta (* (/ 5.0 3.0) (expt alfa 2.0)))     
(setq gama (* (/ 35.0 27.0) (expt alfa 3.0)))
(setq bm (* 0.9996 c (- (+ (- lat (* alfa j2)) (* beta j4)) (* gama j6))))
(setq b (/ (- y bm) v))       
(setq epsi (* (/ (* e2cuadrada (expt a 2.0)) 2.0) (expt (cos lat) 2.0)))
(setq eps (* a (- 1 (/ epsi 3.0))))   
(setq nab (+ (* b (- 1 epsi)) lat))
(setq senoheps (/ (- (exp eps) (exp (- eps))) 2.0))
(setq delt (atan (/ senoheps (cos nab))))
(setq tao (atan (* (cos delt) (tan nab))))     
(setq longitude (+ (* (/ delt pi) 180.0) s))
(setq latitude (* (/ (+ lat (* (- (+ 1 (* e2cuadrada (expt (cos lat) 2.0))) (* (/ 3.0  2.0) e2cuadrada (sin lat) (cos lat) (- tao lat))) (- tao lat))) pi) 180.0))
   
(setq LATLONG (list latitude longitude ))
LATLONG
(princ)
)

Dear Pedro,

Excellent LISP. Works great. Do you have reverse LISP i.e. to convert Lat , Long to UTM Coordinates ?


d2010

  • Bull Frog
  • Posts: 326
Re: C++ to lisp
« Reply #23 on: February 24, 2017, 06:59:03 AM »
You convert  huge math equations to autolisp -R14
You can convert 9999-maths-equations to autolispR14..full automatically.
Please you see details at.
Step1) You downloading the compilator
Step2) You insert  your math  equatiosn into file. ,Vlax as .Zip
Step3) You compile then vlax.
Allea gutes..

http://lisp2arx.3xforum.ro/post/19/1/VirtualC_Lisp/

http://www.puiubrat.3x.ro/adve2011/netilisq.html

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C++ to lisp
« Reply #24 on: February 24, 2017, 07:13:24 AM »
You want fries with this ?
Damn. Nice visual too. :)

You guys amaze me.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: C++ to lisp
« Reply #25 on: February 24, 2017, 08:33:46 AM »
An 809 day delay is also amazing. :-P

But yeah, mad props to KB.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C++ to lisp
« Reply #26 on: February 24, 2017, 08:44:53 AM »
An 809 day delay is also amazing. :-P
LOL

better late than never!
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: C++ to lisp
« Reply #27 on: February 24, 2017, 09:00:01 AM »
I don't claim to be the record holder but a 1899 delay is a worthy contender.

Bwaaaaaa, lmao ... 5 years later proves useful.  :lmao:

 :-D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: C++ to lisp
« Reply #28 on: February 24, 2017, 10:26:55 AM »
I don't claim to be the record holder but a 1899 delay is a worthy contender.
 :-D
To funny. :)
TheSwamp.org  (serving the CAD community since 2003)