Giter Club home page Giter Club logo

Comments (7)

teunbrand avatar teunbrand commented on July 24, 2024

I thought I made a separate issue from bugs and features to discuss ideas. I think it is the appropriate time to think about hex stickers!

Here is a 'one true ring' inspired idea (didn't reprex well due to grid not being able to find the font):

library(ggfx)
library(geomtextpath)

t <- seq(0, 2*pi, length.out = 360)

df <- data.frame(
  x = cos(t),
  y = sin(t),
  id = rep(1:3, each = 120),
  label = "geomtextpath"
)

t <- seq(1.5 * pi, -0.5 * pi, length.out = 7)
hex <- data.frame(
  x = cos(t),
  y = sin(t)
)

my_label <- function(
  family = "Uncial Antiqua",
  size = 6,
  colour = NA,
  linetype = 0,
  ...
) {
  geom_textpath(family = family, size = size, 
                colour = colour, linetype = linetype)
}

ggplot(df, aes(x, y)) +
  geom_textpath(aes(group = id, label = label))

ggplot(df, aes(x, y, label = label, group = id)) +
  geom_polygon(data = hex, aes(x * 1.5, y * 1.5), fill = "black", inherit.aes = FALSE) +
  with_blur(my_label(colour = "red"), sigma = 20) +
  with_blur(my_label(colour = "darkorange"), sigma = 10) +
  with_blur(my_label(colour = "gold"), sigma = 5) +
  my_label(colour = "#ffffcc") +
  coord_equal() +
  theme_void()

image

from geomtextpath.

AllanCameron avatar AllanCameron commented on July 24, 2024

I'm a big Tolkien fan, so I have to admit I really like the look of this. Although it's much more aesthetically pleasing than my attempt, I do wonder if it's a bit illegible. Also, I like the idea of someone looking at the hex logo and knowing at a glance what it does.

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

Yes that is a perfectly reasonable criticism. Below, I've taken the blueprint idea from your logo and made it more blueprint-y:

(Again, not very reprexable due to font)

library(geomtextpath)
library(grid)

t <- seq(pi, 1.5 * pi, length.out = 180)

df <- data.frame(
  x = cos(t) + 0.6,
  y = sin(t) + 0.6
)


t2 <- seq(1.5 * pi, -0.5 * pi, length.out = 7)
hex <- data.frame(
  x = cos(t2),
  y = sin(t2)
)

angs <- seq(1.5 * pi, 1 * pi, length.out = 10)

p <- ggplot(df, aes(x, y)) +
  geom_polygon(data = hex,  fill = "#3B51D4") +
  geom_polygon(data = hex, aes(x = 0.8660254*x, y = 0.8660254*y),
               fill = NA, colour = "#ffffff88", size = 2) +
  annotate(
    "path", x = cos(t) * 0.9 + 0.6, y = sin(t) * 0.9 + 0.6,
    colour = "white", arrow = arrow(type = "closed", angle = 15), 
    size = 2
  ) +
  annotate(
    "segment", x = -0.5, xend = -0.52, colour = "white",
    y = seq(-0.5, 0.5, by = 0.05), yend = seq(-0.5, 0.5, by = 0.05),
    alpha = 0.5
  ) +
  annotate(
    "segment", y = -0.5, yend = -0.52, colour = "white",
    x = seq(-0.5, 0.5, by = 0.05), xend = seq(-0.5, 0.5, by = 0.05),
    alpha = 0.5
  ) +
  annotate(
    "segment", x = cos(angs) + 0.6, y = sin(angs) + 0.6, 
    xend = cos(angs) * 0.8 + 0.6, yend = sin(angs) * 0.8 + 0.6,
    colour = "white", alpha = 0.2
  ) +
  geom_vline(
    xintercept = c(-0.5, 0, 0.5), 
    colour = "#ffffff22", size = 1
  ) +
  geom_hline(
    yintercept = c(-0.5, 0, 0.5), colour = "#ffffff22", size = 1
  ) +
  geom_vline(
    xintercept = seq(-0.75, 0.75, by = 0.25), 
    colour = "#ffffff22", size = 0.5
  ) +
  geom_hline(
    yintercept = seq(-0.75, 0.75, by = 0.25), 
    colour = "#ffffff22", size = 0.5
  ) +
  geom_textpath(label = "geomtextpath", colour = "white", size = 10,
                family = "Montserrat", fontface = "bold", linetype = 0) +
  coord_equal() +
  theme_void()

gt <- ggplotGrob(p)
grid.newpage(); grid.draw(gt)
grid.force()
grid::grid.edit(
  "geom_polygon.polygon", grep = TRUE, global = TRUE,
  gp = grid::gpar(fill = radialGradient(c("#4F65D8", "#3B51D4", "#2336A3")))
)

image

from geomtextpath.

AllanCameron avatar AllanCameron commented on July 24, 2024

Wow! That's more like it! Can we please keep this one?!?

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

Yes, I'll write a small script to generate the logo (properly) and upload it to the github repo along with the logo. I don't know what the appropriate place is for such a script that is not a function, but I'm sure that as long as we put it in the build ignore list, it'll be fine.

from geomtextpath.

AllanCameron avatar AllanCameron commented on July 24, 2024

Couldn't you put it in the readme?

from geomtextpath.

teunbrand avatar teunbrand commented on July 24, 2024

Yes, it's in #12 so this can be closed. We can reopen if we want to revisit the topic of the logo.

from geomtextpath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.