Mapping Streamplot into graphics without arrows

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
1












This question follows from the example below



Mapping StreamPlot onto spherical surfaces



When I'm trying to remove the arrows I cannot get the 3d graphics:



sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, -π, π, θ, 0, π, 
StreamColorFunction -> Hue,
StreamScale -> None, ImageSize -> 200];

sp3d = Graphics3D[
sp[[1]] /.
Arrow[z_] :>
Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x],
Cos[y]], ImageSize -> 200];
Row[sp, sp3d, Spacer[5]]


The result is below. Any idea how to get the 3d graphics without the arrows?



enter image description here










share|improve this question



























    up vote
    5
    down vote

    favorite
    1












    This question follows from the example below



    Mapping StreamPlot onto spherical surfaces



    When I'm trying to remove the arrows I cannot get the 3d graphics:



    sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, -π, π, θ, 0, π, 
    StreamColorFunction -> Hue,
    StreamScale -> None, ImageSize -> 200];

    sp3d = Graphics3D[
    sp[[1]] /.
    Arrow[z_] :>
    Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x],
    Cos[y]], ImageSize -> 200];
    Row[sp, sp3d, Spacer[5]]


    The result is below. Any idea how to get the 3d graphics without the arrows?



    enter image description here










    share|improve this question

























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      This question follows from the example below



      Mapping StreamPlot onto spherical surfaces



      When I'm trying to remove the arrows I cannot get the 3d graphics:



      sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, -π, π, θ, 0, π, 
      StreamColorFunction -> Hue,
      StreamScale -> None, ImageSize -> 200];

      sp3d = Graphics3D[
      sp[[1]] /.
      Arrow[z_] :>
      Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x],
      Cos[y]], ImageSize -> 200];
      Row[sp, sp3d, Spacer[5]]


      The result is below. Any idea how to get the 3d graphics without the arrows?



      enter image description here










      share|improve this question















      This question follows from the example below



      Mapping StreamPlot onto spherical surfaces



      When I'm trying to remove the arrows I cannot get the 3d graphics:



      sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, -π, π, θ, 0, π, 
      StreamColorFunction -> Hue,
      StreamScale -> None, ImageSize -> 200];

      sp3d = Graphics3D[
      sp[[1]] /.
      Arrow[z_] :>
      Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x],
      Cos[y]], ImageSize -> 200];
      Row[sp, sp3d, Spacer[5]]


      The result is below. Any idea how to get the 3d graphics without the arrows?



      enter image description here







      plotting graphics3d






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 23 at 21:33









      Jason B.

      46.2k382177




      46.2k382177










      asked Aug 23 at 19:42









      jarhead

      689413




      689413




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You can also post-process the graphics objects sp and sp3d from the accepted answer in the the linked q/a (1) to change Arrows to Lines or (2) to change the Arrowheads directive to Arrowheads[0]:



          sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, - π, π, θ, 0, π, 
          StreamColorFunction -> Hue, ImageSize -> 200];
          sp3d = Graphics3D[sp[[1]] /. Arrow[z_] :>
          Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x], Cos[y]],
          ImageSize -> 200];

          Row[sp, sp3d /. Arrow -> Line, Spacer[5]]


          enter image description here



          Row[sp, sp3d /. Arrowheads[_] :> Arrowheads[0], Spacer[5]]



          same picture







          share|improve this answer





























            up vote
            4
            down vote













            The sp output includes a GraphicsComplex, so the arguments of the primitives are indices into the GraphicsComplex and not coordinates. Also, your StreamPlot uses Line primitives instead of Arrow primitives. So, a corrected version would be:



            Graphics3D[
            ReplaceAll[
            Normal[sp][[1]],
            Line[z_]:>Line[z/.x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]]
            ]
            ]


            enter image description here



            Note that Normal modifies the colors, so an alternative is to transform the GraphicsComplex:



            Graphics3D[
            ReplaceAll[
            sp[[1]],
            x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]
            ],
            ImageSize->400
            ]


            enter image description here



            The latter method is identical to @Jason's now deleted answer.






            share|improve this answer






















              Your Answer




              StackExchange.ifUsing("editor", function ()
              return StackExchange.using("mathjaxEditing", function ()
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              );
              );
              , "mathjax-editing");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "387"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f180535%2fmapping-streamplot-into-graphics-without-arrows%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote



              accepted










              You can also post-process the graphics objects sp and sp3d from the accepted answer in the the linked q/a (1) to change Arrows to Lines or (2) to change the Arrowheads directive to Arrowheads[0]:



              sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, - π, π, θ, 0, π, 
              StreamColorFunction -> Hue, ImageSize -> 200];
              sp3d = Graphics3D[sp[[1]] /. Arrow[z_] :>
              Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x], Cos[y]],
              ImageSize -> 200];

              Row[sp, sp3d /. Arrow -> Line, Spacer[5]]


              enter image description here



              Row[sp, sp3d /. Arrowheads[_] :> Arrowheads[0], Spacer[5]]



              same picture







              share|improve this answer


























                up vote
                2
                down vote



                accepted










                You can also post-process the graphics objects sp and sp3d from the accepted answer in the the linked q/a (1) to change Arrows to Lines or (2) to change the Arrowheads directive to Arrowheads[0]:



                sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, - π, π, θ, 0, π, 
                StreamColorFunction -> Hue, ImageSize -> 200];
                sp3d = Graphics3D[sp[[1]] /. Arrow[z_] :>
                Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x], Cos[y]],
                ImageSize -> 200];

                Row[sp, sp3d /. Arrow -> Line, Spacer[5]]


                enter image description here



                Row[sp, sp3d /. Arrowheads[_] :> Arrowheads[0], Spacer[5]]



                same picture







                share|improve this answer
























                  up vote
                  2
                  down vote



                  accepted







                  up vote
                  2
                  down vote



                  accepted






                  You can also post-process the graphics objects sp and sp3d from the accepted answer in the the linked q/a (1) to change Arrows to Lines or (2) to change the Arrowheads directive to Arrowheads[0]:



                  sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, - π, π, θ, 0, π, 
                  StreamColorFunction -> Hue, ImageSize -> 200];
                  sp3d = Graphics3D[sp[[1]] /. Arrow[z_] :>
                  Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x], Cos[y]],
                  ImageSize -> 200];

                  Row[sp, sp3d /. Arrow -> Line, Spacer[5]]


                  enter image description here



                  Row[sp, sp3d /. Arrowheads[_] :> Arrowheads[0], Spacer[5]]



                  same picture







                  share|improve this answer














                  You can also post-process the graphics objects sp and sp3d from the accepted answer in the the linked q/a (1) to change Arrows to Lines or (2) to change the Arrowheads directive to Arrowheads[0]:



                  sp = StreamPlot[Cot[θ] Cos[ϕ], -Sin[ϕ], ϕ, - π, π, θ, 0, π, 
                  StreamColorFunction -> Hue, ImageSize -> 200];
                  sp3d = Graphics3D[sp[[1]] /. Arrow[z_] :>
                  Arrow[z /. x_Real, y_Real :> Cos[x] Sin[y], Sin[y] Sin[x], Cos[y]],
                  ImageSize -> 200];

                  Row[sp, sp3d /. Arrow -> Line, Spacer[5]]


                  enter image description here



                  Row[sp, sp3d /. Arrowheads[_] :> Arrowheads[0], Spacer[5]]



                  same picture








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 24 at 0:56

























                  answered Aug 24 at 0:41









                  kglr

                  161k8185384




                  161k8185384




















                      up vote
                      4
                      down vote













                      The sp output includes a GraphicsComplex, so the arguments of the primitives are indices into the GraphicsComplex and not coordinates. Also, your StreamPlot uses Line primitives instead of Arrow primitives. So, a corrected version would be:



                      Graphics3D[
                      ReplaceAll[
                      Normal[sp][[1]],
                      Line[z_]:>Line[z/.x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]]
                      ]
                      ]


                      enter image description here



                      Note that Normal modifies the colors, so an alternative is to transform the GraphicsComplex:



                      Graphics3D[
                      ReplaceAll[
                      sp[[1]],
                      x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]
                      ],
                      ImageSize->400
                      ]


                      enter image description here



                      The latter method is identical to @Jason's now deleted answer.






                      share|improve this answer


























                        up vote
                        4
                        down vote













                        The sp output includes a GraphicsComplex, so the arguments of the primitives are indices into the GraphicsComplex and not coordinates. Also, your StreamPlot uses Line primitives instead of Arrow primitives. So, a corrected version would be:



                        Graphics3D[
                        ReplaceAll[
                        Normal[sp][[1]],
                        Line[z_]:>Line[z/.x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]]
                        ]
                        ]


                        enter image description here



                        Note that Normal modifies the colors, so an alternative is to transform the GraphicsComplex:



                        Graphics3D[
                        ReplaceAll[
                        sp[[1]],
                        x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]
                        ],
                        ImageSize->400
                        ]


                        enter image description here



                        The latter method is identical to @Jason's now deleted answer.






                        share|improve this answer
























                          up vote
                          4
                          down vote










                          up vote
                          4
                          down vote









                          The sp output includes a GraphicsComplex, so the arguments of the primitives are indices into the GraphicsComplex and not coordinates. Also, your StreamPlot uses Line primitives instead of Arrow primitives. So, a corrected version would be:



                          Graphics3D[
                          ReplaceAll[
                          Normal[sp][[1]],
                          Line[z_]:>Line[z/.x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]]
                          ]
                          ]


                          enter image description here



                          Note that Normal modifies the colors, so an alternative is to transform the GraphicsComplex:



                          Graphics3D[
                          ReplaceAll[
                          sp[[1]],
                          x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]
                          ],
                          ImageSize->400
                          ]


                          enter image description here



                          The latter method is identical to @Jason's now deleted answer.






                          share|improve this answer














                          The sp output includes a GraphicsComplex, so the arguments of the primitives are indices into the GraphicsComplex and not coordinates. Also, your StreamPlot uses Line primitives instead of Arrow primitives. So, a corrected version would be:



                          Graphics3D[
                          ReplaceAll[
                          Normal[sp][[1]],
                          Line[z_]:>Line[z/.x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]]
                          ]
                          ]


                          enter image description here



                          Note that Normal modifies the colors, so an alternative is to transform the GraphicsComplex:



                          Graphics3D[
                          ReplaceAll[
                          sp[[1]],
                          x_Real,y_Real:>Cos[x] Sin[y],Sin[y] Sin[x],Cos[y]
                          ],
                          ImageSize->400
                          ]


                          enter image description here



                          The latter method is identical to @Jason's now deleted answer.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Aug 24 at 4:09

























                          answered Aug 23 at 21:00









                          Carl Woll

                          58k274150




                          58k274150



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f180535%2fmapping-streamplot-into-graphics-without-arrows%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay