220 19169 <moon46$tfn$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Point class
Date: Wed, 22 Jul 2015 14:24:06 -0400
Lines: 53
Approved: news@gmane.org
Message-ID: <moon46$tfn$1@ger.gmane.org>
References: <beb0ccd3-3537-4c3a-a8a9-98aa2fe2a029@isocpp.org>	<mooeku$du2$1@ger.gmane.org>	<CAE+wLFBX2NByqyJ36jmCciy876+aV-jzcqDxMxJXrh9_TR4wEg@mail.gmail.com>	<mooimp$ekc$1@ger.gmane.org>	<CAE+wLFABbz9FRv1EA_UiAuTn7AY0txqr7iXVFWxaqDzoC0UT8Q@mail.gmail.com>	<moojtn$8fb$1@ger.gmane.org> <CAE+wLFCmL-WQ_QoDchxskfe+gYYGbcrh_fj1d=mPuyCNcOV5pw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1437589469 31223 80.91.229.3 (22 Jul 2015 18:24:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 Jul 2015 18:24:29 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBUF7X6WQKGQECRBHMUQ@isocpp.org Wed Jul 22 20:24:20 2015
Return-path: <std-proposals+bncBC37LBFWUIFBBUF7X6WQKGQECRBHMUQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f199.google.com ([209.85.217.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBUF7X6WQKGQECRBHMUQ@isocpp.org>)
	id 1ZHygj-00087E-P1
	for gclcip-std-proposals@m.gmane.org; Wed, 22 Jul 2015 20:24:17 +0200
Original-Received: by lbcjf8 with SMTP id jf8sf59741986lbc.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Jul 2015 11:24:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-type:user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=eGzLcvQM/sML0KpJvD9V6aU9kbgQExm6SvRh64ygr4Q=;
        b=ArD6BJ7OdB5qiHoPH0yEK1i01KQTasZFeZYJbnR0KpRq7FIuwU8sBd/nzL4E6YrNho
         HvFiSQU2XpiXj8DHBlmOcFihoHrEX6Zr9m2NCyfNUomPZPidBftvVTu5vn8LmJLqKIuO
         IT5IDuSiwnZxzqtKZiNGlkSvOHpGbc1CGOKFae0NDveZ5dHTKKcyO9SRtXOUjwWrLo51
         soYhJVSYkO5p9+YffywjnkEGDo3UpTkm6ugq4SIwWIXovIA5Zxi5zim+50e5738g0v3q
         4D+HULT7PnVdfGesgt3JMaY/tv/ZI+KLGuH1ratmHl9Ws+V6xJi63zvRMc6+S2ccXvw7
         
X-Gm-Message-State: ALoCoQlnqBN/AQsAyKOW+6ZuZITs25RumP0g3FPduWYLkKnYEJmS6VK4h8QMRwA1jrKTVcmzOyqa
X-Received: by 10.180.106.10 with SMTP id gq10mr12120615wib.0.1437589457088;
        Wed, 22 Jul 2015 11:24:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.28.100 with SMTP id a4ls141195lah.52.gmail; Wed, 22 Jul
 2015 11:24:15 -0700 (PDT)
X-Received: by 10.152.21.103 with SMTP id u7mr3543564lae.49.1437589455171;
        Wed, 22 Jul 2015 11:24:15 -0700 (PDT)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id rc5si1837152lac.166.2015.07.22.11.24.15
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Wed, 22 Jul 2015 11:24:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1ZHyge-00085v-36
	for std-proposals@isocpp.org; Wed, 22 Jul 2015 20:24:12 +0200
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Wed, 22 Jul 2015 20:24:12 +0200
Original-Received: from mwoehlke.floss by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Wed, 22 Jul 2015 20:24:12 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 44
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To: <CAE+wLFCmL-WQ_QoDchxskfe+gYYGbcrh_fj1d=mPuyCNcOV5pw@mail.gmail.com>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19169
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19169>

On 2015-07-22 13:46, David Haim wrote:
> yes, every vector can be built from the origin to some point, thus any
> point can represent a vector (starting from the origin) and vice-versa.
> a point is definitely not a vector, and a vector is not a point. saying
> that one is redundant is not mathematically right.

Maybe not, but from a programming standpoint this is a *semantic*
difference. You will find many instances of geometry libraries that have
a "vector" type that is used interchangeably for both entities. GLSL, to
name a big one.

(That said, I bet I could find mathematicians that would say that a
point *is* a vector... at least in a linear algebra sense, if not a
geometry sense.)

> plus, let's say in the future we want to implement a "Rectangle" or
> "Circle" shape, I don't see how mathematically speaking a rectangle is
> composed from 4 vectors. It is composed from 4 points.

I have a CAD suite I've been working on (off and on) for ages that uses
Eigen for the low level geometry classes. All point locations are given
as Eigen::Vector3D. I don't even have typedefs to semantically separate
"actual" vectors from points.

> but if you insist that a point is a vector , you are recognizing the vast
> utilities a Point can have: the entire linear algebra and the virtual
> graphics use it as key feature. this is exactly why C++ has to standardize
> it.

I think you meant "utilities a Vector can have", but yes, that's exactly
my point; a well-featured vector type can do everything a point type
can, plus a LOT more.

Really, what you want isn't a point type, it's an N-dimensional array of
numbers that supports various linear algebra operations. And really,
that's all a "vector" is in the linear algebra sense; it's usage in a
geometry context that supplies more specific semantics. That's going to
be far more widely useful than something restricted to the semantics of
a geometry "point".

Oh, and, it should also be a subclass of std::array :-).

-- 
Matthew

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
