Author Topic: [Challenge] intersection of lines and planes  (Read 8824 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: [Challenge] intersection of lines and planes
« Reply #15 on: January 20, 2011, 04:34:08 PM »
Don't have time to play  :-(

But have posted similar code here

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: [Challenge] intersection of lines and planes
« Reply #16 on: January 20, 2011, 06:27:35 PM »

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: [Challenge] intersection of lines and planes
« Reply #17 on: January 21, 2011, 08:16:39 AM »
my variant:
Code: [Select]
(defun inters_w-line-2p (P1 P2 V VP fl / P)
 (if (setq p ((lambda (a b c)
               (inters a b (list (car a) (cadr a) c) (list (car b) (cadr b) c) fl)
              )
              (trans p1 0 v)
              (trans p2 0 v)
              (caddr (trans vp 0 v))
             )
     )
  (trans p v 0)
 )
)

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: [Challenge] intersection of lines and planes
« Reply #18 on: January 21, 2011, 10:26:02 AM »
my variant:
Code: [Select]
(defun inters_w-line-2p (P1 P2 V VP fl / P)
 (if (setq p ((lambda (a b c)
               (inters a b (list (car a) (cadr a) c) (list (car b) (cadr b) c) fl)
              )
              (trans p1 0 v)
              (trans p2 0 v)
              (caddr (trans vp 0 v))
             )
     )
  (trans p v 0)
 )
)

very funny idea !

I learn a lot from this code for trans

http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: [Challenge] intersection of lines and planes
« Reply #19 on: January 21, 2011, 10:31:11 AM »
Thank you!
This code is faster than the mathematical algorithms...  :-)

m4rdy

  • Newt
  • Posts: 62
Re: [Challenge] intersection of lines and planes
« Reply #20 on: January 21, 2011, 10:56:35 AM »
About line-plane intersection from stig madsen

http://www.theswamp.org/index.php?topic=2505.0

mardi
Autocad 2007, Windows XP

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: [Challenge] intersection of lines and planes
« Reply #21 on: January 21, 2011, 01:45:54 PM »
Very nice trick Evgeniy  8-)
Speaking English as a French Frog

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: [Challenge] intersection of lines and planes
« Reply #22 on: January 21, 2011, 03:54:24 PM »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: [Challenge] intersection of lines and planes
« Reply #23 on: January 21, 2011, 06:41:37 PM »
Excellent solution Evgeniy !!
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.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: [Challenge] intersection of lines and planes
« Reply #24 on: January 23, 2011, 02:58:04 AM »
I'm glad you liked this theme!